From d9f3c208f2e2b60b40f0559be7e914ac07dbb7ae Mon Sep 17 00:00:00 2001 From: upsiflu Date: Wed, 26 Mar 2025 16:36:26 +0100 Subject: [PATCH] fix(front): tabs - no more infinite loop (lesson: js can't compare objects) --- front/src/components/ui/Tab.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/components/ui/Tab.vue b/front/src/components/ui/Tab.vue index 82a02aa75..053abf647 100644 --- a/front/src/components/ui/Tab.vue +++ b/front/src/components/ui/Tab.vue @@ -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 })