Skip to content

Commit 33f63b3

Browse files
committed
Code review
1 parent 3ec9320 commit 33f63b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type AppStateStatus = typeof AppState.currentState;
3838
function waitForRedirectAsync(returnUrl: string): Promise<RedirectResult> {
3939
return new Promise(function (resolve) {
4040
_redirectHandler = (event: RedirectEvent) => {
41-
if (event.url && event.url.includes(returnUrl)) {
41+
if (event.url && event.url.startsWith(returnUrl)) {
4242
resolve({ url: event.url, type: 'success' });
4343
}
4444
};
@@ -91,7 +91,7 @@ async function checkResultAndReturnUrl(
9191
try {
9292
await handleAppStateActiveOnce();
9393
const url = await Linking.getInitialURL();
94-
return url && url.includes(returnUrl) ? { url, type: 'success' } : result;
94+
return url && url.startsWith(returnUrl) ? { url, type: 'success' } : result;
9595
} catch {
9696
return result;
9797
}

0 commit comments

Comments
 (0)