From e908c93b5d0585efc063dbbc60170d0648a1559f Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Fri, 8 Dec 2023 07:17:23 +0100 Subject: [PATCH] fix going back in the settings --- src/libs/Navigation/Navigation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/Navigation.ts b/src/libs/Navigation/Navigation.ts index 7d7c7bc718a4..b05fb864adf4 100644 --- a/src/libs/Navigation/Navigation.ts +++ b/src/libs/Navigation/Navigation.ts @@ -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; }