fix ES5 scoping bug

pull/954/head
Rich Harris 7 years ago
parent 7779f26f7f
commit 96eac06e2d

@ -154,7 +154,7 @@ function combineStores(children, store) {
if (!store) store = new Store(); if (!store) store = new Store();
var updates = {}; var updates = {};
for (var key in children) { function addChild(key) {
var child = children[key]; var child = children[key];
updates[key] = child.get(); updates[key] = child.get();
@ -165,6 +165,8 @@ function combineStores(children, store) {
}); });
} }
for (var key in children) addChild(key);
store.set(updates); store.set(updates);
return store; return store;
} }

Loading…
Cancel
Save