瀏覽代碼

fixes crash on iOS

yogevbd 6 年之前
父節點
當前提交
cc88900123
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      lib/ios/RNNBottomTabOptions.m

+ 2
- 2
lib/ios/RNNBottomTabOptions.m 查看文件

@@ -55,7 +55,7 @@
55 55
 			tabBarItem.badgeColor = [RCTConvert UIColor:self.badgeColor];
56 56
 		}
57 57
 		
58
-		if ([self.badge isEqualToString:@""]) {
58
+		if ([self.badge isEqual:[NSNull null]] || [self.badge isEqualToString:@""]) {
59 59
 			tabBarItem.badgeValue = nil;
60 60
 		}
61 61
 	}
@@ -107,7 +107,7 @@
107 107
 	
108 108
 	selectedAttributes[NSFontAttributeName] = [self tabBarTextFont];
109 109
 	[tabItem setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];
110
-
110
+	
111 111
 	
112 112
 	NSMutableDictionary* normalAttributes = [NSMutableDictionary dictionaryWithDictionary:[tabItem titleTextAttributesForState:UIControlStateNormal]];
113 113
 	if (self.textColor) {