Skip to content

Commit

Permalink
Merge pull request Expensify#35978 from dukenv0307/fix/35651
Browse files Browse the repository at this point in the history
Fix logic open in app
  • Loading branch information
marcochavezf authored Feb 13, 2024
2 parents c7d98e5 + 49187db commit f0330aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/DeeplinkWrapper/index.website.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Navigation from '@libs/Navigation/Navigation';
import navigationRef from '@libs/Navigation/navigationRef';
import shouldPreventDeeplinkPrompt from '@libs/Navigation/shouldPreventDeeplinkPrompt';
import * as App from '@userActions/App';
import * as Session from '@userActions/Session';
import CONFIG from '@src/CONFIG';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -62,7 +63,14 @@ function DeeplinkWrapper({children, isAuthenticated, autoAuthState}: DeeplinkWra
const isUnsupportedDeeplinkRoute = routeRegex.test(window.location.pathname);

// Making a few checks to exit early before checking authentication status
if (!isMacOSWeb() || isUnsupportedDeeplinkRoute || hasShownPrompt || CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.DEV || autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED) {
if (
!isMacOSWeb() ||
isUnsupportedDeeplinkRoute ||
hasShownPrompt ||
CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.DEV ||
autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED ||
Session.isAnonymousUser()
) {
return;
}
// We want to show the prompt immediately if the user is already authenticated.
Expand Down

0 comments on commit f0330aa

Please sign in to comment.