Unverified Commit 13890a92 authored by NGPixel's avatar NGPixel

fix: default comment provider not displaying

parent 3407ac88
...@@ -525,19 +525,13 @@ router.get('/*', async (req, res, next) => { ...@@ -525,19 +525,13 @@ router.get('/*', async (req, res, next) => {
} }
// -> Inject comments variables // -> Inject comments variables
const shouldDisplayComments = WIKI.config.features.featurePageComments && WIKI.data.commentProvider.codeTemplate const commentTmpl = {
const commentTmpl = shouldDisplayComments ? {
codeTemplate: WIKI.data.commentProvider.codeTemplate, codeTemplate: WIKI.data.commentProvider.codeTemplate,
head: WIKI.data.commentProvider.head, head: WIKI.data.commentProvider.head,
body: WIKI.data.commentProvider.body, body: WIKI.data.commentProvider.body,
main: WIKI.data.commentProvider.main 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: 'pageUrl', value: `${WIKI.config.host}/i/${page.id}` },
{ key: 'pageId', value: page.id } { key: 'pageId', value: page.id }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment