always call callback if matching action is fired

This commit is contained in:
Sean Yesmunt 2019-10-15 11:20:00 -04:00
parent 4c4f926ee2
commit 6edcf747e1
2 changed files with 8 additions and 8 deletions

2
dist/bundle.es.js vendored
View file

@ -1469,12 +1469,12 @@ 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;
}; };

View file

@ -40,12 +40,12 @@ 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;
}; };