Skip to content

Commit

Permalink
fix(routing): fixed external route events would not be processed
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Dec 19, 2019
1 parent 8b479df commit 807d988
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ export const converter = <T extends GenericObject>(
const unregisterListener = historyInstance.listen((location, action) => {
// don't handle our own actions
if (
action === 'PUSH' ||
(action === 'REPLACE' && location.state && location.state.__g__)
(action === 'REPLACE' || action === 'PUSH') &&
location.state &&
location.state.__g__
) {
return
}
Expand Down

0 comments on commit 807d988

Please sign in to comment.