Skip to content

Commit 273b47e

Browse files
authored
Merge pull request #50504 from bernhardoj/fix/50155-incorrect-rhp-matching-screen
Fix report screen changes to profile view when clicking Country field
2 parents 8f5ba1e + b3a0e38 commit 273b47e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ function getMatchingRootRouteForRHPRoute(route: NavigationPartialRoute): Navigat
117117
// If there is rhpNavigator in the state generated for backTo url, we want to get root route matching to this rhp screen.
118118
const rhpNavigator = stateForBackTo.routes.find((rt) => rt.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR);
119119
if (rhpNavigator && rhpNavigator.state) {
120-
const isRHPinState = stateForBackTo.routes.at(0)?.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR;
121-
122-
if (isRHPinState) {
123-
return getMatchingRootRouteForRHPRoute(findFocusedRoute(stateForBackTo) as NavigationPartialRoute);
124-
}
120+
return getMatchingRootRouteForRHPRoute(findFocusedRoute(stateForBackTo) as NavigationPartialRoute);
125121
}
126122

127123
// If we know that backTo targets the root route (full screen) we want to use it.

0 commit comments

Comments
 (0)