diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx index 5f29860..0bfd82d 100644 --- a/quartz/components/Comments.tsx +++ b/quartz/components/Comments.tsx @@ -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 <> }