diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx index 91f83fc55..d8f06a242 100644 --- a/quartz/components/Comments.tsx +++ b/quartz/components/Comments.tsx @@ -31,7 +31,7 @@ export default ((opts: Options) => { const commentsFlag: boolean = fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true" if ((opts.respectFrontmatter ?? false) && !commentsFlag) { - return null + return <> } return ( @@ -54,10 +54,7 @@ export default ((opts: Options) => { ) } - // make sure we actually need to load the script - if (Comments != null) { - Comments.afterDOMLoaded = script - } + Comments.afterDOMLoaded = script return Comments }) satisfies QuartzComponentConstructor