Skip to content

Commit

Permalink
Merge pull request #32525 from situchan/fix-navigation-crash-app-reload
Browse files Browse the repository at this point in the history
[No QA] fix possible crash on app reload
  • Loading branch information
marcochavezf authored Dec 5, 2023
2 parents f80fbe3 + f893f06 commit 2975048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Navigation/linkTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function linkTo(navigation: NavigationContainerRef<RootStackParam
action.type = CONST.NAVIGATION.ACTION_TYPE.REPLACE;

// If this action is navigating to the RightModalNavigator and the last route on the root navigator is not RightModalNavigator then push
} else if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR && rootState.routes.at(-1)?.name !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
} else if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR && rootState?.routes?.at(-1)?.name !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
action.type = CONST.NAVIGATION.ACTION_TYPE.PUSH;
}
}
Expand Down

0 comments on commit 2975048

Please sign in to comment.