Skip to content

Commit

Permalink
fix: Fix null object exception with tags (#351)
Browse files Browse the repository at this point in the history
Fixes #325
  • Loading branch information
awinograd authored and HazAT committed Feb 14, 2018
1 parent 3ae0679 commit 2a13eb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/src/main/java/io/sentry/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public void captureEvent(ReadableMap event) {

if (castEvent.hasKey("tags")) {
for (Map.Entry<String, Object> entry : castEvent.getMap("tags").toHashMap().entrySet()) {
eventBuilder.withTag(entry.getKey(), entry.getValue().toString());
String tagValue = entry.getValue() != null ? entry.getValue().toString() : "INVALID_TAG";
eventBuilder.withTag(entry.getKey(), tagValue);
}
}

Expand Down

0 comments on commit 2a13eb7

Please sign in to comment.