Skip to content

Commit c417211

Browse files
committed
Make userId optional, Bump sentry-cocoa to 3.5.0
1 parent d22992c commit c417211

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

ios/RNSentry.m

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import <KSCrash/KSCrash.h>
1010
#import <Sentry/Sentry.h>
1111

12-
NSString *const RNSentryVersionString = @"0.18.0";
12+
NSString *const RNSentryVersionString = @"0.17.1";
1313
NSString *const RNSentrySdkName = @"sentry-react-native";
1414

1515
@interface RNSentry()
@@ -379,13 +379,11 @@ - (SentryUser *_Nullable)createUser:(NSDictionary *_Nonnull)user {
379379
} else if (nil != user[@"id"]) {
380380
userId = [NSString stringWithFormat:@"%@", user[@"id"]];
381381
}
382-
SentryUser *sentryUser = nil;
383-
if (nil != userId) {
384-
sentryUser = [[SentryUser alloc] initWithUserId:userId];
385-
sentryUser.email = [NSString stringWithFormat:@"%@", user[@"email"]];
386-
sentryUser.username = [NSString stringWithFormat:@"%@", user[@"username"]];
387-
sentryUser.extra = [RCTConvert NSDictionary:user[@"extra"]];
388-
}
382+
SentryUser *sentryUser = [[SentryUser alloc] init];
383+
sentryUser.userId = userId;
384+
sentryUser.email = [NSString stringWithFormat:@"%@", user[@"email"]];
385+
sentryUser.username = [NSString stringWithFormat:@"%@", user[@"username"]];
386+
sentryUser.extra = [RCTConvert NSDictionary:user[@"extra"]];
389387
return sentryUser;
390388
}
391389

0 commit comments

Comments
 (0)