Skip to content

Commit

Permalink
Correct ES6 map usage. Fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Jun 4, 2015
1 parent 0147d42 commit 2befd9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/createDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,17 @@ export default function createDispatcher() {
// Merge the newly added stores
function receiveStores(nextStores) {
Object.keys(nextStores).forEach(key => {
storeKeys.delete(stores[key]);
stores[key] = nextStores[key];
observers[key] = observers[key] || [];
storeKeys[stores[key]] = key;
storeKeys.set(stores[key], key);
});
dispatch(BOOTSTRAP_STORE);
}

// Get the key a store was registered with
function getStoreKey(store) {
const key = storeKeys[store];
const key = storeKeys.get(store);
invariant(key, 'This store is not registered with the Redux root: %s', store);
return key;
}
Expand Down

0 comments on commit 2befd9d

Please sign in to comment.