Skip to content

Commit

Permalink
fix(tab): register tab logic
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Sep 13, 2024
1 parent 8ccf5ad commit a8b3721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/Tabs/tabsContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const createTabs = (): TabsContext => {

const registerTab = (tab: Tab) => {
tabs.update((currTabs) => [...currTabs, tab]);
if (get(activeTab) === null) activeTab.set(tab.value);
if (get(activeTab) === '') activeTab.set(tab.value);
};

const selectTab = (value: string) => {
Expand Down

0 comments on commit a8b3721

Please sign in to comment.