Commit c3750776 authored by Niklas Saers's avatar Niklas Saers
Browse files

Instead of crashing, show a warning and return

parent b0c0ac10
Loading
Loading
Loading
Loading
+4 −0
Changes for ios/Video/RCTVideo.m: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -436,6 +436,10 @@ static int const RCTVideoUnset = -1;
  bool isAsset = [RCTConvert BOOL:[source objectForKey:@"isAsset"]];
  NSString *uri = [source objectForKey:@"uri"];
  NSString *type = [source objectForKey:@"type"];
  if([uri isEqualToString:@""] || [type isEqualToString:@""]) {
    DebugLog(@"Could not find video URL in source '%@'", source);
    return;
  }

  NSURL *url = isNetwork || isAsset
    ? [NSURL URLWithString:uri]