Skip to content

Commit 8c40857

Browse files
committed
fix: fetal crash
1 parent 20257bd commit 8c40857

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

ios/RNInstabug/InstabugCrashReportingBridge.m

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ + (BOOL)requiresMainQueueSetup
3030
resolver:(RCTPromiseResolveBlock)resolve
3131
rejecter:(RCTPromiseRejectBlock)reject) {
3232

33-
if([fingerprint isKindOfClass:NSNull.class]){
34-
fingerprint = nil;
35-
}
36-
37-
if([userAttributes isKindOfClass:NSNull.class]){
38-
userAttributes = nil;
39-
}
4033
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul);
4134
dispatch_async(queue, ^{
4235
[IBGCrashReporting cp_reportFatalCrashWithStackTrace:stackTrace];
@@ -48,6 +41,14 @@ + (BOOL)requiresMainQueueSetup
4841
userAttributes:(nullable NSDictionary *)userAttributes fingerprint:(nullable NSString *)fingerprint nonFatalExceptionLevel:(IBGNonFatalLevel)nonFatalExceptionLevel
4942
resolver:(RCTPromiseResolveBlock)resolve
5043
rejecter:(RCTPromiseRejectBlock)reject) {
44+
45+
if([fingerprint isKindOfClass:NSNull.class]){
46+
fingerprint = nil;
47+
}
48+
49+
if([userAttributes isKindOfClass:NSNull.class]){
50+
userAttributes = nil;
51+
}
5152
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
5253
dispatch_async(queue, ^{
5354
[IBGCrashReporting cp_reportNonFatalCrashWithStackTrace:stackTrace level:nonFatalExceptionLevel groupingString:fingerprint userAttributes:userAttributes];

0 commit comments

Comments
 (0)