fix(front): tabs - no more infinite loop (lesson: js can't compare objects)

This commit is contained in:
upsiflu 2025-03-26 16:36:26 +01:00
parent 38d3eb74ff
commit d9f3c208f2
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ const { currentTitle, tabs } = inject(TABS_INJECTION_KEY, {
tabs: []
})
whenever(() => !tabs.includes(props), () => {
whenever(() => !tabs.some(tab => props.title === tab.title), () => {
tabs.push(props)
}, { immediate: true })
</script>