fix: handle missing extra field during page render
This commit is contained in:
parent
9762bdc2ce
commit
0fa5b9750d
@ -493,6 +493,9 @@ router.get('/*', async (req, res, next) => {
|
|||||||
body: WIKI.config.theming.injectBody
|
body: WIKI.config.theming.injectBody
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle missing extra field
|
||||||
|
page.extra = page.extra || { css: '', js: '' }
|
||||||
|
|
||||||
if (!_.isEmpty(page.extra.css)) {
|
if (!_.isEmpty(page.extra.css)) {
|
||||||
injectCode.css = `${injectCode.css}\n${page.extra.css}`
|
injectCode.css = `${injectCode.css}\n${page.extra.css}`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user