always call callback if matching action is fired
This commit is contained in:
parent
4c4f926ee2
commit
6edcf747e1
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
|
// only update if the preference changed from last call in the same session
|
||||||
oldShared = shared;
|
oldShared = shared;
|
||||||
doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION);
|
doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
if (sharedStateCb) {
|
if (sharedStateCb) {
|
||||||
// Pass dispatch to the callback to consumers can dispatch actions in response to preference set
|
// Pass dispatch to the callback to consumers can dispatch actions in response to preference set
|
||||||
sharedStateCb({ dispatch, getState });
|
sharedStateCb({ dispatch, getState });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return actionResult;
|
return actionResult;
|
||||||
|
|
|
@ -40,11 +40,11 @@ export const buildSharedStateMiddleware = (
|
||||||
// only update if the preference changed from last call in the same session
|
// only update if the preference changed from last call in the same session
|
||||||
oldShared = shared;
|
oldShared = shared;
|
||||||
doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION);
|
doPreferenceSet(SHARED_PREFERENCE_KEY, shared, SHARED_PREFERENCE_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
if (sharedStateCb) {
|
if (sharedStateCb) {
|
||||||
// Pass dispatch to the callback to consumers can dispatch actions in response to preference set
|
// Pass dispatch to the callback to consumers can dispatch actions in response to preference set
|
||||||
sharedStateCb({ dispatch, getState });
|
sharedStateCb({ dispatch, getState });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return actionResult;
|
return actionResult;
|
||||||
|
|
Loading…
Reference in a new issue