fixed issue where a missing config.json would end up suggesting 'undefined' as a base_url

v1.18.x
Julian Lam 10 years ago
parent e1c3bc9713
commit c4a5af3b1b

@ -29,7 +29,7 @@ questions.main = [
{
name: 'base_url',
description: 'URL used to access this NodeBB',
'default': nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') || 'http://localhost:4567',
'default': nconf.get('base_url') ? (nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '')) : 'http://localhost:4567',
pattern: /^http(?:s)?:\/\//,
message: 'Base URL must begin with \'http://\' or \'https://\'',
},

Loading…
Cancel
Save