Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit a9797d9

Browse files
committed
Merge pull request #178 from langpavel/fix-middleware-return-value
Do not swallow return value of next() in middleware
2 parents 0a9f570 + 609d241 commit a9797d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ export function syncHistory(history) {
6262

6363
return next => action => {
6464
if (action.type !== TRANSITION || !connected) {
65-
next(action)
66-
return
65+
return next(action)
6766
}
6867

68+
const { method, arg } = action
69+
history[method](arg)
70+
6971
// FIXME: Is it correct to swallow the TRANSITION action here and replace
7072
// it with UPDATE_LOCATION instead? We could also use the same type in
7173
// both places instead and just set the location on the action.
72-
73-
const { method, arg } = action
74-
history[method](arg)
74+
//return next(updateLocation(location));
7575
}
7676
}
7777

0 commit comments

Comments
 (0)