diff --git a/store.js b/store.js index 025d96a5ce..d3f3a3a5d9 100644 --- a/store.js +++ b/store.js @@ -154,7 +154,7 @@ function combineStores(children, store) { if (!store) store = new Store(); var updates = {}; - for (var key in children) { + function addChild(key) { var child = children[key]; updates[key] = child.get(); @@ -165,6 +165,8 @@ function combineStores(children, store) { }); } + for (var key in children) addChild(key); + store.set(updates); return store; }