Catch nil linking URI before crashing

probably resolves https://fabric.io/exponent2/ios/apps/host.exp.exponent/issues/5a04de0661b02d480d18a33b

fbshipit-source-id: ad1f8fc
This commit is contained in:
Ben Roth
2017-12-05 01:04:25 +00:00
committed by Exponent GitHub Bot
parent e16ba23995
commit d27395a966

View File

@@ -174,6 +174,9 @@ NSNotificationName kEXKernelRefreshForegroundTaskNotification = @"EXKernelRefres
+ (NSString *)linkingUriForExperienceUri:(NSURL *)uri
{
uri = [self uriTransformedForLinking:uri isUniversalLink:NO];
if (!uri) {
return nil;
}
NSURLComponents *components = [NSURLComponents componentsWithURL:uri resolvingAgainstBaseURL:YES];
// if the provided uri is the shell app manifest uri,