fix: correctly parse falsy js as title (#900)
This commit is contained in:
parent
779c501d9e
commit
b6cf3df84f
@ -57,9 +57,9 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options> | undefined>
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.title) {
|
if (data.title != null && data.title.toString() !== "") {
|
||||||
data.title = data.title.toString()
|
data.title = data.title.toString()
|
||||||
} else if (data.title === null || data.title === undefined) {
|
} else {
|
||||||
data.title = file.stem ?? i18n(cfg.configuration.locale).propertyDefaults.title
|
data.title = file.stem ?? i18n(cfg.configuration.locale).propertyDefaults.title
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user