diff --git a/dist/bundle.es.js b/dist/bundle.es.js index c7e96e3..f860318 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1469,11 +1469,11 @@ const buildSharedStateMiddleware = (actions, sharedStateFilters, sharedStateCb) // only update if the preference changed from last call in the same session oldShared = shared; doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION); + } - if (sharedStateCb) { - // Pass dispatch to the callback to consumers can dispatch actions in response to preference set - sharedStateCb({ dispatch, getState }); - } + if (sharedStateCb) { + // Pass dispatch to the callback to consumers can dispatch actions in response to preference set + sharedStateCb({ dispatch, getState }); } return actionResult; diff --git a/src/redux/middleware/shared-state.js b/src/redux/middleware/shared-state.js index 010638b..a211b16 100644 --- a/src/redux/middleware/shared-state.js +++ b/src/redux/middleware/shared-state.js @@ -40,11 +40,11 @@ export const buildSharedStateMiddleware = ( // only update if the preference changed from last call in the same session oldShared = shared; doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION); + } - if (sharedStateCb) { - // Pass dispatch to the callback to consumers can dispatch actions in response to preference set - sharedStateCb({ dispatch, getState }); - } + if (sharedStateCb) { + // Pass dispatch to the callback to consumers can dispatch actions in response to preference set + sharedStateCb({ dispatch, getState }); } return actionResult;