-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Description
The code revert referenced in #177 results in handleAction always running the reducer if an action with no type is dispatched:
if (type && !includes(actionTypes, type.toString())) {
return state;
}
return (action.error === true ? throwReducer : nextReducer)(state, action);It seems to me that it should be:
if (!type || !includes(actionTypes, type.toString())) {
return state;
}
return (action.error === true ? throwReducer : nextReducer)(state, action);…so that the reducer simply returns the existing state if no type is provided in an action.
emmoistner, Anber, ronaldheft and nantan
Metadata
Metadata
Assignees
Labels
No labels