Fallback if no comment present
This commit is contained in:
parent
4d2611f8a8
commit
e27ad36424
@ -22,7 +22,8 @@ const DisqusComponent = dynamic(
|
||||
|
||||
const Comments = ({ frontMatter }) => {
|
||||
let term
|
||||
if (!siteMetadata.comment) return <></>
|
||||
const comment = siteMetadata?.comment
|
||||
if (!comment || Object.keys(comment).length === 0) return <></>
|
||||
switch (
|
||||
siteMetadata.comment.giscusConfig.mapping ||
|
||||
siteMetadata.comment.utterancesConfig.issueTerm
|
||||
|
Loading…
x
Reference in New Issue
Block a user