mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ExceptionsManager: Fix soft error reporting (#47465)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47465 When you do @(NO), in objc, it creates an NSNumber. So this if condition actually evaluates to true: ``` if (@(NO)) ``` This means that all soft errors will get logged as fatals on ios. Changelog: [Internal] Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: realsoelynn Differential Revision: D65551648 fbshipit-source-id: 99b5bcb5fa1b0b5dc8055a3c86fc983863a25526
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e6090df7dc
commit
50b3c2272f
@@ -155,7 +155,7 @@ RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData
|
||||
NSArray<NSDictionary<NSString *, id> *> *stack = errorData[@"stack"];
|
||||
double exceptionId = [errorData[@"id"] doubleValue];
|
||||
|
||||
if (errorData[@"isFatal"]) {
|
||||
if ([errorData[@"isFatal"] boolValue]) {
|
||||
[self reportFatal:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
} else {
|
||||
[self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
|
||||
Reference in New Issue
Block a user