Fallback if no comment present

This commit is contained in:
Agam More 2022-02-25 23:19:56 -05:00 committed by GitHub
parent 4d2611f8a8
commit e27ad36424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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