Skip to content

Commit efd069f

Browse files
MelvinBotmkhutornyi
andcommitted
Use SCREENS.HOME instead of ROUTES.HOME for deeplink home route check
Compare directly with SCREENS.HOME ('Home', capitalized) instead of lowercasing and comparing with ROUTES.HOME ('home') to avoid potential conflicts with the authorized lowercase home route. Co-authored-by: mkhutornyi <mkhutornyi@users.noreply.github.com>
1 parent a9666ec commit efd069f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libs/actions/Link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function openReportFromDeepLink(
264264

265265
// React Navigation generates /Home (capitalized) for the root URL because PublicScreens uses SCREENS.HOME ('Home')
266266
// at the root level without a path mapping. Treat it as empty route to avoid showing a “not found” page after sign-in.
267-
if (normalizePath(route).toLowerCase() === `/${ROUTES.HOME}`) {
267+
if (normalizePath(route) === `/${SCREENS.HOME}`) {
268268
route = '';
269269
}
270270

0 commit comments

Comments
 (0)