From 13890a92ab354d35923cea904116575029f78d45 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Fri, 29 Apr 2022 19:36:47 -0400 Subject: [PATCH] fix: default comment provider not displaying --- server/controllers/common.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/controllers/common.js b/server/controllers/common.js index de64eb57..052c3757 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -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 }