diff --git a/lib/nconf/stores/env.js b/lib/nconf/stores/env.js index 3d7a7f92..27de7539 100644 --- a/lib/nconf/stores/env.js +++ b/lib/nconf/stores/env.js @@ -53,11 +53,13 @@ Env.prototype.loadEnv = function () { this.readOnly = false; Object.keys(process.env).filter(function (key) { - if(self.match && self.whitelist.length) { + if (self.match && self.whitelist.length) { return key.match(self.match) || self.whitelist.indexOf(key) !== -1 - } else if (self.match) { + } + else if (self.match) { return key.match(self.match) - } else { + } + else { return !self.whitelist.length || self.whitelist.indexOf(key) !== -1 } }).forEach(function (key) {