fix(comments): properly check if comments is in frontmatter (#1627)
This commit is contained in:
		@@ -28,7 +28,8 @@ export default ((opts: Options) => {
 | 
				
			|||||||
  const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
 | 
					  const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
 | 
				
			||||||
    // check if comments should be displayed according to frontmatter
 | 
					    // check if comments should be displayed according to frontmatter
 | 
				
			||||||
    const disableComment: boolean =
 | 
					    const disableComment: boolean =
 | 
				
			||||||
      !fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
 | 
					      typeof fileData.frontmatter?.comments !== "undefined" &&
 | 
				
			||||||
 | 
					      (!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
 | 
				
			||||||
    if (disableComment) {
 | 
					    if (disableComment) {
 | 
				
			||||||
      return <></>
 | 
					      return <></>
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user