Skip to content

Commit bbcb542

Browse files
committed
refactor: update NewTabView .badge
1 parent e8c9ed2 commit bbcb542

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/react-native-bottom-tabs/ios/TabView/NewTabView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ struct NewTabView: AnyTabView {
4040
labeled: props.labeled
4141
)
4242
}
43-
.badge(
44-
(tabData.badge == nil) ? nil : tabData.badge!.isEmpty ? nil : Text(tabData.badge!)
45-
)
43+
.badge(tabData.badge.flatMap { !$0.isEmpty ? Text($0) : nil })
4644
.accessibilityIdentifier(tabData.testID ?? "")
4745
}
4846
}

0 commit comments

Comments
 (0)