Skip to content

Commit

Permalink
ref: nil check event.tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jennmueng committed Mar 18, 2021
1 parent d4dd838 commit f8552cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ios/SentryCordova.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ - (void)setEventOriginTag:(SentryEvent *)event {

- (void)setEventEnvironmentTag:(SentryEvent *)event origin:(NSString *)origin environment:(NSString *)environment {
NSMutableDictionary *newTags = [NSMutableDictionary new];
[newTags addEntriesFromDictionary:event.tags];
if (nil != event.tags) {
[newTags addEntriesFromDictionary:event.tags];
}
[newTags setValue:origin forKey:@"event.origin"];
[newTags setValue:environment forKey:@"event.environment"];
event.tags = newTags;
Expand Down

0 comments on commit f8552cb

Please sign in to comment.