From f24a1472765e0752bcf158a3db53a717b8dc2191 Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Thu, 14 Nov 2024 06:28:06 -0500 Subject: [PATCH] fix(comment): negate check (closes #1582) (#1586) --- quartz/components/Comments.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx index 5f379a1..5f29860 100644 --- a/quartz/components/Comments.tsx +++ b/quartz/components/Comments.tsx @@ -27,9 +27,9 @@ function boolToStringBool(b: boolean): string { export default ((opts: Options) => { const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => { // check if comments should be displayed according to frontmatter - const commentsFlag: boolean = - fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true" - if (!commentsFlag) { + const disableComment: boolean = + !fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false" + if (disableComment) { return <> }