Skip to content
Snippets Groups Projects
Commit 0fa5b975 authored by NGPixel's avatar NGPixel
Browse files

fix: handle missing extra field during page render

parent 9762bdc2
No related branches found
No related tags found
No related merge requests found
......@@ -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}`
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment