Skip to content

Commit 7322e18

Browse files
authored
Merge pull request #286 from divipayhq/develop
Prevent iOS crash when redirect url is null
2 parents 278d4b5 + dbea48f commit 7322e18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ios/RNInAppBrowser.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ + (BOOL)requiresMainQueueSetup
9090
}
9191
};
9292

93-
NSString *escapedRedirectURL = [[NSURL alloc] initWithString:redirectURL].scheme;
93+
NSString *escapedRedirectURL = nil;
94+
if (redirectURL) {
95+
escapedRedirectURL = [[NSURL alloc] initWithString:redirectURL].scheme;
96+
}
9497

9598
if (@available(iOS 12.0, *)) {
9699
webAuthSession = [[ASWebAuthenticationSession alloc]

0 commit comments

Comments
 (0)