Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions packages/react/src/components/navigation/IonTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <IonTabsInner {...this.props}></IonTabsInner>;
Expand Down Expand Up @@ -223,11 +220,11 @@ export const IonTabs = /*@__PURE__*/ (() =>
</PageManager>
) : (
<div className={className ? `${className}` : 'ion-tabs'} {...props} style={hostStyles}>
{tabBar.props.slot === 'top' ? tabBar : null}
{tabBar?.props.slot === 'top' ? tabBar : null}
<div style={tabsInner} className="tabs-inner">
{outlet}
</div>
{tabBar.props.slot === 'bottom' ? tabBar : null}
{tabBar?.props.slot === 'bottom' ? tabBar : null}
</div>
)}
</IonTabsContext.Provider>
Expand Down
Loading