From 2241a36789e16ad5bc66b2c0e42274ff16e4f602 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 12 Feb 2014 12:26:38 -0600 Subject: [PATCH] [fix] have latter stores precede the former stores again. --- lib/nconf/provider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nconf/provider.js b/lib/nconf/provider.js index 06bcf640..5d5bc7bc 100644 --- a/lib/nconf/provider.js +++ b/lib/nconf/provider.js @@ -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];