Skip to content

Commit 77c1278

Browse files
committed
Don't update the store when the page is blacklisted in settings
1 parent dc64c4d commit 77c1278

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/browser/extension/inject/pageScript.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ const preEnhancer = instanceId => next =>
185185
const store = next(reducer, preloadedState, enhancer);
186186

187187
// Mutate the store in order to keep the reference
188-
stores[instanceId].dispatch = store.dispatch;
189-
stores[instanceId].liftedStore = store.liftedStore;
190-
stores[instanceId].getState = store.getState;
188+
if (stores[instanceId]) {
189+
stores[instanceId].dispatch = store.dispatch;
190+
stores[instanceId].liftedStore = store.liftedStore;
191+
stores[instanceId].getState = store.getState;
192+
}
191193

192194
return {
193195
...store,

0 commit comments

Comments
 (0)