From 75e3791360387cc684624c95ee7f2bcc0ca1199d Mon Sep 17 00:00:00 2001 From: Oliver Winter Date: Thu, 23 Jan 2025 11:34:08 +0100 Subject: [PATCH] fix: fix crash on iOS when adding fontWeight on old arch builds (#253) --- .../ios/Fabric/RCTTabViewComponentView.mm | 2 +- packages/react-native-bottom-tabs/ios/TabViewProvider.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-bottom-tabs/ios/Fabric/RCTTabViewComponentView.mm b/packages/react-native-bottom-tabs/ios/Fabric/RCTTabViewComponentView.mm index 67ba09b..18daaab 100644 --- a/packages/react-native-bottom-tabs/ios/Fabric/RCTTabViewComponentView.mm +++ b/packages/react-native-bottom-tabs/ios/Fabric/RCTTabViewComponentView.mm @@ -156,7 +156,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & } if (oldViewProps.fontWeight != newViewProps.fontWeight) { - _tabViewProvider.fontWeigth = RCTNSStringFromStringNilIfEmpty(newViewProps.fontWeight); + _tabViewProvider.fontWeight = RCTNSStringFromStringNilIfEmpty(newViewProps.fontWeight); } if (oldViewProps.fontFamily != newViewProps.fontFamily) { diff --git a/packages/react-native-bottom-tabs/ios/TabViewProvider.swift b/packages/react-native-bottom-tabs/ios/TabViewProvider.swift index 3b63452..707a240 100644 --- a/packages/react-native-bottom-tabs/ios/TabViewProvider.swift +++ b/packages/react-native-bottom-tabs/ios/TabViewProvider.swift @@ -145,9 +145,9 @@ public final class TabInfo: NSObject { } } - @objc public var fontWeigth: NSString? { + @objc public var fontWeight: NSString? { didSet { - props.fontWeight = fontWeigth as? String + props.fontWeight = fontWeight as? String } }