We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0147d42 commit 2befd9dCopy full SHA for 2befd9d
src/createDispatcher.js
@@ -74,16 +74,17 @@ export default function createDispatcher() {
74
// Merge the newly added stores
75
function receiveStores(nextStores) {
76
Object.keys(nextStores).forEach(key => {
77
+ storeKeys.delete(stores[key]);
78
stores[key] = nextStores[key];
79
observers[key] = observers[key] || [];
- storeKeys[stores[key]] = key;
80
+ storeKeys.set(stores[key], key);
81
});
82
dispatch(BOOTSTRAP_STORE);
83
}
84
85
// Get the key a store was registered with
86
function getStoreKey(store) {
- const key = storeKeys[store];
87
+ const key = storeKeys.get(store);
88
invariant(key, 'This store is not registered with the Redux root: %s', store);
89
return key;
90
0 commit comments