Skip to content

Commit 1fdef52

Browse files
authored
fix: remove native warning when there are no images passed (#92)
1 parent d7bf3b6 commit 1fdef52

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

android/src/main/java/com/rcttabview/RCTTabView.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
125125

126126
for (idx in 0 until icons.size()) {
127127
val source = icons.getMap(idx)
128+
val uri = source.getString("uri")
129+
if (uri.isNullOrEmpty()) {
130+
continue
131+
}
128132
val imageSource =
129-
ImageSource(
130-
context,
131-
source.getString("uri")
132-
)
133+
ImageSource(
134+
context,
135+
uri
136+
)
133137
this.icons[idx] = imageSource
134138

135139
// Update existing item if exists.

0 commit comments

Comments
 (0)