mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
fix(comment): negate check
preserve previous behaviour for `Components.Comment()`
This commit is contained in:
parent
1ab9c91df1
commit
a1c1aa6438
@ -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 <></>
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user