Skip to content

Commit

Permalink
Fix middleware's destruction error
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxSvargal committed Feb 13, 2017
1 parent df8c7c3 commit 5c831b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-redux-bind",
"version": "0.2.0",
"version": "0.2.1",
"description": "Redux bindings for React Router Next v4",
"main": "index.js",
"module": "src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ROUTER_ACTION } from './actions'

const routerMiddleware = history =>
() => next => action => {
const { type, payload: { method, args } } = action
if (type !== ROUTER_ACTION) return next(action)
if (action.type !== ROUTER_ACTION) return next(action)
const { payload: { method, args } } = action
history[method](...args)
}

Expand Down

0 comments on commit 5c831b8

Please sign in to comment.