diff --git a/app/views/redirect.js b/app/views/redirect.js index b7ddce3..3245367 100644 --- a/app/views/redirect.js +++ b/app/views/redirect.js @@ -145,8 +145,9 @@ function partialFinder(markdownBody) { if (fileExistsTest) { const partialFunction = require(path.join(__dirname, "..", `./components/${filename}.js`)); - const markdownHtml = filename === "glossary-toc" ? partialFunction : partialFunction.default(); // kill special case - markdownBody = markdownBody.replace(partial, `${markdownHtml}
`); + + if (filename === "glossary-toc") markdownBody = markdownBody.replace(partial, partialFunction); + else markdownBody = markdownBody.replace(partial, `
${partialFunction.default()}
`); } }