소스 검색

fixes crash on iOS

yogevbd 6 년 전
부모
커밋
cc88900123
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      lib/ios/RNNBottomTabOptions.m

+ 2
- 2
lib/ios/RNNBottomTabOptions.m 파일 보기

55
 			tabBarItem.badgeColor = [RCTConvert UIColor:self.badgeColor];
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
 			tabBarItem.badgeValue = nil;
59
 			tabBarItem.badgeValue = nil;
60
 		}
60
 		}
61
 	}
61
 	}
107
 	
107
 	
108
 	selectedAttributes[NSFontAttributeName] = [self tabBarTextFont];
108
 	selectedAttributes[NSFontAttributeName] = [self tabBarTextFont];
109
 	[tabItem setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];
109
 	[tabItem setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];
110
-
110
+	
111
 	
111
 	
112
 	NSMutableDictionary* normalAttributes = [NSMutableDictionary dictionaryWithDictionary:[tabItem titleTextAttributesForState:UIControlStateNormal]];
112
 	NSMutableDictionary* normalAttributes = [NSMutableDictionary dictionaryWithDictionary:[tabItem titleTextAttributesForState:UIControlStateNormal]];
113
 	if (self.textColor) {
113
 	if (self.textColor) {