use_port only accepts string but saves as boolean, accept both now

previously, if you re-feed your config back in, it breaks
This commit is contained in:
psychobunny
2014-04-14 15:28:41 -04:00
parent 8496bdcff6
commit 98b112bb36

View File

@@ -179,7 +179,7 @@ function completeConfigSetup(err, config, next) {
config.bcrypt_rounds = 12;
config.upload_path = '/public/uploads';
config.use_port = config.use_port.slice(0, 1) === 'y';
config.use_port = typeof config.use_port === 'boolean' ? config.use_port : config.use_port.slice(0, 1) === 'y';
var urlObject = url.parse(config.base_url),
relative_path = (urlObject.pathname && urlObject.pathname.length > 1) ? urlObject.pathname : '',