File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,10 +62,19 @@ - (void)setPrimaryFontFamily:(NSString *)newValue {
6262- (UIFont *)primaryFont {
6363 if (_primaryFontNeedsRecreation) {
6464 _primaryFontNeedsRecreation = NO ;
65+
66+ NSString *newFontWeight = [self primaryFontWeight ];
67+ // fix RCTFontWeight conversion warnings:
68+ // sometimes changing font family comes with weight '0' if not specified
69+ // RCTConvert doesn't recognize this value so we just nullify it and it gets a default value
70+ if ([newFontWeight isEqualToString: @" 0" ]) {
71+ newFontWeight = nullptr ;
72+ }
73+
6574 _primaryFont = [RCTFont updateFont: nullptr
6675 withFamily: [self primaryFontFamily ]
6776 size: [self primaryFontSize ]
68- weight: [ self primaryFontWeight ]
77+ weight: newFontWeight
6978 style: nullptr
7079 variant: nullptr
7180 scaleMultiplier: 1 ];
You can’t perform that action at this time.
0 commit comments