Skip to content

Commit

Permalink
fix(comment): negate check (closes #1582) (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarnphm authored Nov 14, 2024
1 parent 137d55e commit f24a147
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quartz/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <></>
}

Expand Down

0 comments on commit f24a147

Please sign in to comment.