Skip to content

Commit fc80388

Browse files
committed
Avoid stringifying null redirect url
1 parent 7a87cf6 commit fc80388

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/InAppBrowser.ios.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ function setup() {
219219
if (!this.initializeWebBrowser(resolve, reject)) return;
220220

221221
const url = NSURL.URLWithString(authUrl);
222-
const escapedRedirectURL = NSURL.URLWithString(redirectUrl).scheme;
222+
let escapedRedirectURL: string = null;
223+
if (redirectUrl) {
224+
escapedRedirectURL = NSURL.URLWithString(redirectUrl).scheme;
225+
}
223226
this.authSession = (
224227
Utils.ios.MajorVersion >= 12
225228
? ASWebAuthenticationSession

0 commit comments

Comments
 (0)