From 73b83a876805caf272caea13474e1874e06a296e Mon Sep 17 00:00:00 2001 From: David Fischer Date: Tue, 5 Nov 2024 09:30:28 +0100 Subject: [PATCH] chore(comments): cleanup logic --- quartz/components/Comments.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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