Skip to content

Commit

Permalink
Fix slice => splice typo in Vue Tabs component (#1037)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Gossiaux <[email protected]>
  • Loading branch information
RobinMalfait and rgossiaux authored Jan 14, 2022
1 parent 058996b commit 93c93d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@headlessui-vue/src/components/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}

Expand Down

0 comments on commit 93c93d3

Please sign in to comment.