Skip to content

Commit

Permalink
Add check for action type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Baroni committed Jan 3, 2017
1 parent 626cb53 commit 8928e26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "redux-action-listeners",
"description": "Listen for actions in Redux",
"version": "1.0.0",
"version": "1.0.1",
"main": "lib/index.js",
"authors": [
"Nick Baroni <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-action-listeners",
"version": "1.0.0",
"version": "1.0.1",
"description": "Listen for actions in Redux",
"main": "lib/index.js",
"jsnext:main": "es/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function actionListenerMiddleware(listener) {

const dispatched = next(action);

return ( allTypes || (types.indexOf(action.type) > -1) )
return action.type && ( allTypes || (types.indexOf(action.type) > -1) )
? listener.handleAction(action, dispatched, store)
: dispatched;
};
Expand Down

0 comments on commit 8928e26

Please sign in to comment.