Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(comments): properly check if comments is in frontmatter #1627

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

saberzero1
Copy link
Collaborator

@saberzero1 saberzero1 commented Dec 1, 2024

Currently enabling the comments component hides the comments unless the comments frontmatter value is set to true.

This is due to !undefined evaluating to true.

This PR adds a check to ensure the comments component are only disabled on a page if the comments key is present in the frontmatter and its value is false or "false".

Closes #1582

@saberzero1 saberzero1 marked this pull request as ready for review December 1, 2024 00:46
@saberzero1 saberzero1 requested a review from Copilot December 1, 2024 00:47

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

@saberzero1 saberzero1 requested a review from aarnphm December 1, 2024 00:49
@aarnphm aarnphm merged commit 7ac94e1 into jackyzha0:v4 Dec 1, 2024
5 checks passed
@saberzero1 saberzero1 deleted the comment-undefined-fix branch December 1, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comments Component now Fails to Load
2 participants