Browse Source

fix: handle missing extra field during page render

pull/2543/head
NGPixel 4 years ago
parent
commit
0fa5b9750d
1 changed files with 3 additions and 0 deletions
  1. 3
      server/controllers/common.js

3
server/controllers/common.js

@ -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}`
}

Loading…
Cancel
Save