Skip to content

Commit 3470b5f

Browse files
committed
fix(tabs): improve error log when activeTab is invalid
1 parent 5c416bc commit 3470b5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tabs/Tabs.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TabContent } from './TabContent';
66
export function Tabs({ vertical, tabs, activeTab, onlyRenderActiveTab, bordered, onSelect }) {
77
if (activeTab >= tabs.length) {
88
// eslint-disable-next-line no-console
9-
console.error(`Invalid tab selected: ${activeTab}`);
9+
console.error(`Invalid tab selected: ${activeTab}. The first tab will be selected instead.`);
1010
activeTab = 0;
1111
}
1212

0 commit comments

Comments
 (0)