mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
fix: database 0 was being replaced with undefined because 0 is falsy
This commit is contained in:
@@ -132,7 +132,13 @@ function setupConfig(next) {
|
||||
var allQuestions = questions.main.concat(questions.optional).concat(redisQuestions).concat(mongoQuestions).concat(postgresQuestions);
|
||||
|
||||
allQuestions.forEach(function (question) {
|
||||
config[question.name] = install.values[question.name] || question.default || undefined;
|
||||
if (install.values.hasOwnProperty(question.name)) {
|
||||
config[question.name] = install.values[question.name];
|
||||
} else if (question.hasOwnProperty('default')) {
|
||||
config[question.name] = question.default;
|
||||
} else {
|
||||
config[question.name] = undefined;
|
||||
}
|
||||
});
|
||||
setImmediate(next, null, config);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user