Skip to content

Commit

Permalink
fix: default comment provider not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Apr 29, 2022
1 parent 3407ac8 commit 13890a9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions server/controllers/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,19 +525,13 @@ router.get('/*', async (req, res, next) => {
}

// -> Inject comments variables
const shouldDisplayComments = WIKI.config.features.featurePageComments && WIKI.data.commentProvider.codeTemplate
const commentTmpl = shouldDisplayComments ? {
const commentTmpl = {
codeTemplate: WIKI.data.commentProvider.codeTemplate,
head: WIKI.data.commentProvider.head,
body: WIKI.data.commentProvider.body,
main: WIKI.data.commentProvider.main
} : {
codeTemplate: false,
head: null,
body: null,
main: ''
}
if (shouldDisplayComments) {
if (WIKI.config.features.featurePageComments && WIKI.data.commentProvider.codeTemplate) {
[
{ key: 'pageUrl', value: `${WIKI.config.host}/i/${page.id}` },
{ key: 'pageId', value: page.id }
Expand Down

0 comments on commit 13890a9

Please sign in to comment.