fix: handle missing extra field during page render

This commit is contained in:
NGPixel 2020-10-03 16:50:51 -04:00
parent 9762bdc2ce
commit 0fa5b9750d

View File

@ -493,6 +493,9 @@ router.get('/*', async (req, res, next) => {
body: WIKI.config.theming.injectBody
}
// Handle missing extra field
page.extra = page.extra || { css: '', js: '' }
if (!_.isEmpty(page.extra.css)) {
injectCode.css = `${injectCode.css}\n${page.extra.css}`
}