Skip to content

Commit 69f7be1

Browse files
don't trigger reducer when type doesn't exist (fix #185)
1 parent 9037379 commit 69f7be1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-actions",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Flux Standard Action utlities for Redux",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/handleAction.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function handleAction(actionType, reducer = identity, defaultStat
2424

2525
return (state = defaultState, action) => {
2626
const { type } = action;
27-
if (type && !includes(actionTypes, type.toString())) {
27+
if (!type || !includes(actionTypes, type.toString())) {
2828
return state;
2929
}
3030

0 commit comments

Comments
 (0)