Skip to content

Commit

Permalink
Update RNSentryModule.java (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
Titozzz authored and mitsuhiko committed Oct 11, 2019
1 parent d2cf9ce commit 4186e10
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion android/src/main/java/io/sentry/RNSentryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,17 @@ public void sendEvent(ReadableMap event, Promise promise) {
}

if (breadcrumb.hasKey("type")) {
breadcrumbBuilder.setType(breadcrumb.getString("type"));
String breadcrumbType = breadcrumb.getString("type");

if (Breadcrumb.Type.HTTP.getValue().equals(breadcrumbType)) {
breadcrumbBuilder.setType(Breadcrumb.Type.HTTP);
} else if (Breadcrumb.Type.NAVIGATION.getValue().equals(breadcrumbType)) {
breadcrumbBuilder.setType(Breadcrumb.Type.NAVIGATION);
} else if (Breadcrumb.Type.USER.getValue().equals(breadcrumbType)) {
breadcrumbBuilder.setType(Breadcrumb.Type.USER);
} else {
breadcrumbBuilder.setType(Breadcrumb.Type.DEFAULT);
}
}

try {
Expand Down

0 comments on commit 4186e10

Please sign in to comment.