fix(comments): properly check if comments is in frontmatter (#1627)
This commit is contained in:
parent
e1d754ef79
commit
7ac94e1d84
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ export default ((opts: Options) => {
|
|||
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
|
||||
// check if comments should be displayed according to frontmatter
|
||||
const disableComment: boolean =
|
||||
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
|
||||
typeof fileData.frontmatter?.comments !== "undefined" &&
|
||||
(!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
|
||||
if (disableComment) {
|
||||
return <></>
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue