[fix] have latter stores precede the former stores again.

This commit is contained in:
Christopher Jeffrey 2014-02-12 12:26:38 -06:00
parent 0bb89ee2b4
commit 2241a36789

View file

@ -522,13 +522,13 @@ Provider.prototype._execute = function (action, syncLength /* [arguments] */) {
} }
if (callback) { 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(); return err ? callback(err) : callback();
}); });
} }
Object.keys(this.stores).forEach(function (name) { Object.keys(this.stores).reverse().forEach(function (name) {
if (typeof response === 'undefined') { if (typeof response === 'undefined') {
var store = self.stores[name]; var store = self.stores[name];