Skip to content

Commit

Permalink
Update packages/design-system/src/components/Tabs/Primitive/TabState.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois authored Jul 18, 2023
1 parent 99caaa1 commit 88aba15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function useTabState(initialState?: TabInitialState): TabStateReturn {
}, [initialState?.tabs]);

useEffect(() => {
if (selectedId !== initialState?.selectedId) {
if (selectedId !== initialState?.selectedId && initialState?.selectedId) {
setSelectedId(initialState?.selectedId);
}

Expand Down

0 comments on commit 88aba15

Please sign in to comment.