diff --git a/React/Base/RCTLog.m b/React/Base/RCTLog.m index d6bf845900b..b9360f44909 100644 --- a/React/Base/RCTLog.m +++ b/React/Base/RCTLog.m @@ -225,7 +225,7 @@ void _RCTLogInternal( NSString *address = [[frameSymbols componentsSeparatedByString:@"0x"][1] componentsSeparatedByString:@" "][0]; NSRange addressRange = [frameSymbols rangeOfString:address]; NSString *methodName = [frameSymbols substringFromIndex:(addressRange.location + addressRange.length + 1)]; - if (idx == 1) { + if (idx == 1 && fileName) { NSString *file = [@(fileName) componentsSeparatedByString:@"/"].lastObject; [stack addObject:@{@"methodName": methodName, @"file": file, @"lineNumber": @(lineNumber)}]; } else {