Skip to content

Commit

Permalink
fix(comments): properly check if comments is in frontmatter (#1627)
Browse files Browse the repository at this point in the history
  • Loading branch information
saberzero1 authored Dec 1, 2024
1 parent e1d754e commit 7ac94e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quartz/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default ((opts: Options) => {
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
// check if comments should be displayed according to frontmatter
const disableComment: boolean =
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
typeof fileData.frontmatter?.comments !== "undefined" &&
(!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
if (disableComment) {
return <></>
}
Expand Down

0 comments on commit 7ac94e1

Please sign in to comment.