1
0
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:
Juan Picado @jotadeveloper 2017-07-27 08:18:34 +02:00
parent d0afe78e98
commit ff96d2ec0c
No known key found for this signature in database
GPG Key ID: 18AC54485952D158

@ -42,7 +42,7 @@ module.exports = function(config, auth, storage) {
const defaultTitle = 'Verdaccio';
let webPage = template
.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`);
res.setHeader('Content-Type', 'text/html');