Skip to content

Commit

Permalink
move isMagicLink below conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Aug 18, 2023
1 parent 1cb533a commit 6ae1796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/DeeplinkWrapper/index.website.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ function DeeplinkWrapper({children}) {
return;
}

// Match any magic link (/v/<account id>/<6 digit code>)
const isMagicLink = CONST.REGEX.ROUTES.VALIDATE_LOGIN.test(window.location.pathname);

// If the current url path is /transition..., meaning it was opened from oldDot, during this transition period:
// 1. The user session may not exist, because sign-in has not been completed yet.
// 2. There may be non-idempotent operations (e.g. create a new workspace), which obviously should not be executed again in the desktop app.
Expand All @@ -41,6 +38,9 @@ function DeeplinkWrapper({children}) {
return;
}

// Match any magic link (/v/<account id>/<6 digit code>)
const isMagicLink = CONST.REGEX.ROUTES.VALIDATE_LOGIN.test(window.location.pathname);

App.beginDeepLinkRedirect(!isMagicLink);
}, []);

Expand Down

0 comments on commit 6ae1796

Please sign in to comment.