@momo-kits/foundation 0.92.1-rc.8 → 0.92.1-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,7 +165,7 @@ export default function BottomTabBar({
165
165
  tabStyle,
166
166
  });
167
167
  const focusedRoute = state.routes[state.index] as any;
168
- const focusedDescriptor = descriptors[focusedRoute?.key] as any;
168
+ const focusedDescriptor = descriptors?.[focusedRoute?.key] as any;
169
169
  const focusedOptions = focusedDescriptor?.options;
170
170
  const shouldShowTabBar =
171
171
  focusedOptions?.tabBarVisible !== false && !keyboardHidesTabBar;
@@ -265,7 +265,7 @@ export default function BottomTabBar({
265
265
  (data: any[]) => {
266
266
  return data?.map((route, index) => {
267
267
  const focused = route.params.name === focusedTab;
268
- const {options} = descriptors[route?.key] as any;
268
+ const {options = {}} = descriptors?.[route?.key] as any;
269
269
  const onPress = () => {
270
270
  const event = navigation.emit({
271
271
  type: 'tabPress',
@@ -305,7 +305,7 @@ export default function BottomTabBar({
305
305
  return (
306
306
  <NavigationContext.Provider
307
307
  key={route.key}
308
- value={(descriptors as any)[route.key].navigation}>
308
+ value={(descriptors as any)?.[route.key]?.navigation}>
309
309
  <NavigationRouteContext.Provider value={route}>
310
310
  <BottomTabBarItem
311
311
  route={route}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.1-rc.8",
3
+ "version": "0.92.1-rc.9",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {