Skip to content

Commit 0541812

Browse files
committed
fix
1 parent 5a399ae commit 0541812

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ios/BottomTabPresenter.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ - (void)mergeOptions:(RNNNavigationOptions *)mergeOptions
3838

3939
- (void)createTabBarItem:(UIViewController *)child
4040
bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
41-
child.tabBarItem = [_tabCreator createTabBarItem:bottomTabOptions mergeItem:child.tabBarItem];
41+
UITabBarItem *updatedItem = [_tabCreator createTabBarItem:bottomTabOptions mergeItem:child.tabBarItem];
42+
if (updatedItem != child.tabBarItem) {
43+
child.tabBarItem = updatedItem;
44+
}
4245
}
4346

4447
@end

ios/RNNTabBarItemCreator.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@implementation RNNTabBarItemCreator
66

77
- (UITabBarItem *)createTabBarItem:(UITabBarItem *)mergeItem {
8-
return [UITabBarItem new];
8+
return mergeItem ?: [UITabBarItem new];
99
}
1010

1111
- (UITabBarItem *)createTabBarItem:(RNNBottomTabOptions *)bottomTabOptions

0 commit comments

Comments
 (0)