Merge pull request #1246 from niklassaers/master
Instead of crashing, show a warning and return
This commit is contained in:
commit
f69231fe81
@ -467,6 +467,10 @@ static int const RCTVideoUnset = -1;
|
|||||||
bool shouldCache = [RCTConvert BOOL:[source objectForKey:@"shouldCache"]];
|
bool shouldCache = [RCTConvert BOOL:[source objectForKey:@"shouldCache"]];
|
||||||
NSString *uri = [source objectForKey:@"uri"];
|
NSString *uri = [source objectForKey:@"uri"];
|
||||||
NSString *type = [source objectForKey:@"type"];
|
NSString *type = [source objectForKey:@"type"];
|
||||||
|
if (!uri || [uri isEqualToString:@""]) {
|
||||||
|
DebugLog(@"Could not find video URL in source '%@'", source);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NSURL *url = isNetwork || isAsset
|
NSURL *url = isNetwork || isAsset
|
||||||
? [NSURL URLWithString:uri]
|
? [NSURL URLWithString:uri]
|
||||||
|
Loading…
Reference in New Issue
Block a user