From a8b3721916dbb54158c3a3cf80cef02e843bfc2e Mon Sep 17 00:00:00 2001 From: Gear <84141000+macgeargear@users.noreply.github.com> Date: Sat, 14 Sep 2024 02:47:53 +0700 Subject: [PATCH] fix(tab): register tab logic --- src/lib/components/Tabs/tabsContext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/Tabs/tabsContext.ts b/src/lib/components/Tabs/tabsContext.ts index f76abd0..64a29d3 100644 --- a/src/lib/components/Tabs/tabsContext.ts +++ b/src/lib/components/Tabs/tabsContext.ts @@ -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) => {