Skip to content

Commit 9318619

Browse files
committed
fix comment
1 parent 1aa0aa5 commit 9318619

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/libs/Navigation/helpers/getAdaptedStateFromPath.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ function getMatchingFullScreenRoute(route: NavigationPartialRoute) {
5959
const isDynamicScreen = isDynamicRouteScreen(route.name as Screen);
6060

6161
// Check for backTo param. One screen with different backTo value may need different screens visible under the overlay.
62-
// Before checking backTo, we verify the URL doesn't end with a dynamic route suffix.
63-
// Dynamic routes never carry their own backTo - they only inherit it from the screen underneath.
64-
// So when a dynamic suffix is present, we must strip it first to resolve the correct full-screen
65-
// route from the base path, rather than letting backTo (which belongs to the underlying screen) dictate it.
62+
// Dynamic screens are skipped here because they never carry their own backTo - they only
63+
// inherit it from the screen underneath. Letting backTo dictate the full-screen route for
64+
// a dynamic screen would resolve the wrong page.
6665
if (isRouteWithBackToParam(route) && !isDynamicScreen) {
6766
const stateForBackTo = getStateFromPath(route.params.backTo as RoutePath);
6867

0 commit comments

Comments
 (0)