Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 46ecb04

Browse files
serhiipalashAshoat
authored andcommitted
Fix middleware crashing the app when action is null (#95)
1 parent d6273db commit 46ecb04

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/middleware.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function triggerAllSubscribers(key: string, payload: NavigationEventPayload) {
5757
const trigger =
5858
() => getReduxSubscribers(key).forEach(subscriber => subscriber(payload));
5959
if (
60+
!payload.action ||
6061
!payload.action.hasOwnProperty('type') ||
6162
!payload.action.type.startsWith("Navigation") ||
6263
payload.state === payload.lastState

0 commit comments

Comments
 (0)