From 72b5019416168b674d6459b89befe0a26d1ed6c1 Mon Sep 17 00:00:00 2001 From: daiwei Date: Sat, 4 Oct 2025 16:57:20 +0800 Subject: [PATCH] chore: tweaks --- packages/runtime-dom/src/apiCustomElement.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/runtime-dom/src/apiCustomElement.ts b/packages/runtime-dom/src/apiCustomElement.ts index 6c6ab395e..912523cb4 100644 --- a/packages/runtime-dom/src/apiCustomElement.ts +++ b/packages/runtime-dom/src/apiCustomElement.ts @@ -686,20 +686,15 @@ export class VueElement roots.push(...this._teleportTargets) } - const seen = new Set() - const slots: HTMLSlotElement[] = [] + const slots = new Set() for (const root of roots) { const found = root.querySelectorAll('slot') for (let i = 0; i < found.length; i++) { - const slot = found[i] - if (!seen.has(slot)) { - seen.add(slot) - slots.push(slot) - } + slots.add(found[i]) } } - return slots + return Array.from(slots) } /**