wrap saving of url_parsed in conditional, since url isn't set during setup

This commit is contained in:
Julian Lam
2016-08-22 18:16:09 -04:00
parent 60ea7d5121
commit ebb50160cb

4
app.js
View File

@@ -104,7 +104,9 @@ function loadConfig() {
nconf.set('core_templates_path', path.join(__dirname, 'src/views'));
nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-persona/templates'));
nconf.set('url_parsed', url.parse(nconf.get('url')));
if (nconf.get('url')) {
nconf.set('url_parsed', url.parse(nconf.get('url')));
}
}