From c4a5af3b1b139d8f94c50706d628e8bc46b04f76 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 8 Oct 2014 23:27:31 -0400 Subject: [PATCH] fixed issue where a missing config.json would end up suggesting 'undefined' as a base_url --- src/install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.js b/src/install.js index fbb4fc59bf..ef1e186d23 100644 --- a/src/install.js +++ b/src/install.js @@ -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://\'', },