Commit 0fa5b975 authored by NGPixel's avatar NGPixel

fix: handle missing extra field during page render

parent 9762bdc2
......@@ -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}`
}
......
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