Merge pull request #406 from agamm/master

Fallback if no comment present
This commit is contained in:
Timothy 2022-02-28 22:12:50 +08:00 committed by GitHub
commit 370bdba906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,8 @@ const DisqusComponent = dynamic(
const Comments = ({ frontMatter }) => {
let term
const comment = siteMetadata?.comment
if (!comment || Object.keys(comment).length === 0) return <></>
switch (
siteMetadata.comment.giscusConfig.mapping ||
siteMetadata.comment.utterancesConfig.issueTerm