Fix crash in `RCTJSStackFrame::stackFrameWithDictionary:`
Summary: Motivation: When logging to RCTRedBox, if any of the stack frames lacks a line number or a column, the application will crash with `[NSNull integerValue]: unrecognized selector sent to instance`. Closes https://github.com/facebook/react-native/pull/13242 Differential Revision: D4812185 Pulled By: hramos fbshipit-source-id: 4b1c3c38f67cf59034a383c95d4280d1b6380300
This commit is contained in:
parent
92190727d1
commit
9075fe0618
|
@ -70,8 +70,8 @@ static NSRegularExpression *RCTJSStackFrameRegex()
|
|||
{
|
||||
return [[self alloc] initWithMethodName:dict[@"methodName"]
|
||||
file:dict[@"file"]
|
||||
lineNumber:[dict[@"lineNumber"] integerValue]
|
||||
column:[dict[@"column"] integerValue]];
|
||||
lineNumber:[RCTNilIfNull(dict[@"lineNumber"]) integerValue]
|
||||
column:[RCTNilIfNull(dict[@"column"]) integerValue]];
|
||||
}
|
||||
|
||||
+ (NSArray<RCTJSStackFrame *> *)stackFramesWithLines:(NSString *)lines
|
||||
|
|
Loading…
Reference in New Issue