Skip to content

Conversation

@Gustash
Copy link

@Gustash Gustash commented May 3, 2022

If one of the badge values was 0, it would cause a crash because it would try to render the 0 outside of a Text component.

The code also didn't allow for a badge with 0 to be rendered in the first place.

This fixes that by checking if the type of the badge value is a number, instead of checking if it's truthy.

If one of the badge values was `0`, it would cause a crash because it would try to render the `0` outside of a `Text` component.

The code also didn't allow for a badge with `0` to be rendered in the first place.

This fixes that by checking if the type of the badge value is a `number`, instead of checking if it's _truthy_.
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.

1 participant