From 807d988f44f35d477c7556199211f6061eed0e7c Mon Sep 17 00:00:00 2001 From: David Heidrich Date: Thu, 19 Dec 2019 11:31:54 +0100 Subject: [PATCH] fix(routing): fixed external route events would not be processed --- src/lib/middleware.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/middleware.ts b/src/lib/middleware.ts index 83979eb..3ef933d 100644 --- a/src/lib/middleware.ts +++ b/src/lib/middleware.ts @@ -277,8 +277,9 @@ export const converter = ( 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 }