mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
chore(comments): cleanup logic
This commit is contained in:
parent
b36f389eb8
commit
73b83a8768
@ -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<Options>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user