mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
fix: undefined check
This commit is contained in:
parent
d0afe78e98
commit
ff96d2ec0c
@ -42,7 +42,7 @@ module.exports = function(config, auth, storage) {
|
|||||||
const defaultTitle = 'Verdaccio';
|
const defaultTitle = 'Verdaccio';
|
||||||
let webPage = template
|
let webPage = template
|
||||||
.replace(/ToReplaceByVerdaccio/g, base)
|
.replace(/ToReplaceByVerdaccio/g, base)
|
||||||
.replace(/ToReplaceByTitle/g, _.isNil(config.web.title) ? defaultTitle : config.web.title)
|
.replace(/ToReplaceByTitle/g, _.get(config, 'web.title') ? config.web.title : defaultTitle)
|
||||||
.replace(/(main.*\.js|style.*\.css)/g, `${base}/-/static/$1`);
|
.replace(/(main.*\.js|style.*\.css)/g, `${base}/-/static/$1`);
|
||||||
|
|
||||||
res.setHeader('Content-Type', 'text/html');
|
res.setHeader('Content-Type', 'text/html');
|
||||||
|
Loading…
Reference in New Issue
Block a user