From 48bc1e18f9111e30b672138a8a3fa630371681e6 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 14 Oct 2019 23:56:14 -0400 Subject: [PATCH] pass getState to calback too --- dist/bundle.es.js | 2 +- src/redux/middleware/shared-state.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 909cc06..d9fb456 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1470,7 +1470,7 @@ const buildSharedStateMiddleware = (actions, sharedStateFilters, sharedStateCb) if (sharedStateCb) { // Pass dispatch to the callback to consumers can dispatch actions in response to preference set - sharedStateCb(dispatch); + sharedStateCb({ dispatch, getState }); } } diff --git a/src/redux/middleware/shared-state.js b/src/redux/middleware/shared-state.js index 7ca42c9..010638b 100644 --- a/src/redux/middleware/shared-state.js +++ b/src/redux/middleware/shared-state.js @@ -43,7 +43,7 @@ export const buildSharedStateMiddleware = ( if (sharedStateCb) { // Pass dispatch to the callback to consumers can dispatch actions in response to preference set - sharedStateCb(dispatch); + sharedStateCb({ dispatch, getState }); } }