always call callback if matching action is fired (#222)
always call callback if matching action is fired
This commit is contained in:
commit
582e7043b5
2 changed files with 8 additions and 8 deletions
8
dist/bundle.es.js
vendored
8
dist/bundle.es.js
vendored
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue