From 93c93d33045844933ef0be28089b4a50b09edb3a Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 14 Jan 2022 12:16:36 +0100 Subject: [PATCH] Fix slice => splice typo in Vue Tabs component (#1037) Co-authored-by: Ryan Gossiaux --- packages/@headlessui-vue/src/components/tabs/tabs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@headlessui-vue/src/components/tabs/tabs.ts b/packages/@headlessui-vue/src/components/tabs/tabs.ts index c72784d033..c4353ade99 100644 --- a/packages/@headlessui-vue/src/components/tabs/tabs.ts +++ b/packages/@headlessui-vue/src/components/tabs/tabs.ts @@ -85,14 +85,14 @@ export let TabGroup = defineComponent({ }, unregisterTab(tab: typeof tabs['value'][number]) { let idx = tabs.value.indexOf(tab) - if (idx !== -1) tabs.value.slice(idx, 1) + if (idx !== -1) tabs.value.splice(idx, 1) }, registerPanel(panel: typeof panels['value'][number]) { if (!panels.value.includes(panel)) panels.value.push(panel) }, unregisterPanel(panel: typeof panels['value'][number]) { let idx = panels.value.indexOf(panel) - if (idx !== -1) panels.value.slice(idx, 1) + if (idx !== -1) panels.value.splice(idx, 1) }, }