Skip to content

Commit

Permalink
[fix] have latter stores precede the former stores again.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Feb 12, 2014
1 parent 0bb89ee commit 2241a36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nconf/provider.js
Expand Up @@ -522,13 +522,13 @@ Provider.prototype._execute = function (action, syncLength /* [arguments] */) {
}

if (callback) {
return async.forEach(Object.keys(this.stores), runAction, function (err) {
return async.forEach(Object.keys(this.stores).reverse(), runAction, function (err) {
return err ? callback(err) : callback();
});
}


Object.keys(this.stores).forEach(function (name) {
Object.keys(this.stores).reverse().forEach(function (name) {
if (typeof response === 'undefined') {
var store = self.stores[name];

Expand Down

0 comments on commit 2241a36

Please sign in to comment.