Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native: allow serializing enabledBreadcrumbTypes as null #1316

Merged
merged 1 commit into from Jul 13, 2021

Conversation

fractalwrench
Copy link
Contributor

Goal

Serializes enabledBreadcrumbTypes as null when it is null in config, rather than as an empty list. The specification states that null is equivalent to having specified automatic capture of all breadcrumb types.

Testing

Verified using the RN test fixtures that an automatic breadcrumb is sent through when the enabledBreadcrumbTypes is null:

Screenshot 2021-07-13 at 10 58 27

@fractalwrench fractalwrench changed the title React Native: serialize null enabledBreadcrumbTypes as null React Native: allow serializing enabledBreadcrumbTypes as null Jul 13, 2021
@@ -35,6 +35,9 @@ public void serialize(Map<String, Object> map, ImmutableConfig config) {
}

private Collection<String> serializeBreadrumbTypes(ImmutableConfig config) {
if (config.getEnabledBreadcrumbTypes() == null) {
return null;
}
Collection<String> crumbTypes = new HashSet<>();
Set<BreadcrumbType> types = config.getEnabledBreadcrumbTypes();
if (types != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could remove this guard as well

@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1512.34 1409.1
arm64_v8a 402.11 299.71
armeabi 385.72 279.22
armeabi_v7a 369.34 262.85
x86 443.05 336.55
x86_64 426.67 320.18

Generated by 🚫 Danger

@fractalwrench fractalwrench merged commit cd3af60 into next Jul 13, 2021
@fractalwrench fractalwrench deleted the rn-config-tweak branch July 13, 2021 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants