Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/metal-rocks-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-bottom-tabs": patch
---

fix(android): don't crash when no elements are found
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {

private fun updateTintColors() {
// First let's check current item color.
val currentItemTintColor = items.first { it.key == selectedItem }.activeTintColor
val currentItemTintColor = items.firstOrNull { it.key == selectedItem }?.activeTintColor

// getDefaultColor will always return a valid color but to satisfy the compiler we need to check for null
val colorPrimary = currentItemTintColor ?: activeTintColor ?: Utils.getDefaultColorFor(
Expand Down
Loading