diff --git a/packages/react/src/components/navigation/IonTabs.tsx b/packages/react/src/components/navigation/IonTabs.tsx index 6de93bd6a8e..c23de222b5d 100644 --- a/packages/react/src/components/navigation/IonTabs.tsx +++ b/packages/react/src/components/navigation/IonTabs.tsx @@ -165,9 +165,6 @@ export const IonTabs = /*@__PURE__*/ (() => if (outlet && hasTab) { throw new Error('IonTabs cannot contain an IonRouterOutlet and an IonTab at the same time'); } - if (!tabBar) { - throw new Error('IonTabs needs a IonTabBar'); - } if (hasTab) { return ; @@ -223,11 +220,11 @@ export const IonTabs = /*@__PURE__*/ (() => ) : (
- {tabBar.props.slot === 'top' ? tabBar : null} + {tabBar?.props.slot === 'top' ? tabBar : null}
{outlet}
- {tabBar.props.slot === 'bottom' ? tabBar : null} + {tabBar?.props.slot === 'bottom' ? tabBar : null}
)}