Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jdnichollsc committed Jul 29, 2022
1 parent 3ec9320 commit 33f63b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type AppStateStatus = typeof AppState.currentState;
function waitForRedirectAsync(returnUrl: string): Promise<RedirectResult> {
return new Promise(function (resolve) {
_redirectHandler = (event: RedirectEvent) => {
if (event.url && event.url.includes(returnUrl)) {
if (event.url && event.url.startsWith(returnUrl)) {
resolve({ url: event.url, type: 'success' });
}
};
Expand Down Expand Up @@ -91,7 +91,7 @@ async function checkResultAndReturnUrl(
try {
await handleAppStateActiveOnce();
const url = await Linking.getInitialURL();
return url && url.includes(returnUrl) ? { url, type: 'success' } : result;
return url && url.startsWith(returnUrl) ? { url, type: 'success' } : result;
} catch {
return result;
}
Expand Down

0 comments on commit 33f63b3

Please sign in to comment.