Skip to content

Commit

Permalink
fix going back in the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Dec 8, 2023
1 parent 205b696 commit e908c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Navigation/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function goBack(fallbackRoute: Route, shouldEnforceFallback = false, shouldPopTo
const rootState = navigationRef.getRootState();
const lastRoute = rootState.routes.at(-1);
// If the user comes from a different flow (there is more than one route in RHP) we should go back to the previous flow on UP button press instead of using the fallbackRoute.
if (lastRoute?.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR && (lastRoute.state?.index ?? 0) > 0) {
if (lastRoute?.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
navigationRef.current.goBack();
return;
}
Expand Down

0 comments on commit e908c93

Please sign in to comment.