chore: tweaks
ci / test (push) Has been cancelled Details
ci / continuous-release (push) Has been cancelled Details

This commit is contained in:
daiwei 2025-10-04 16:57:20 +08:00
parent b661cd3402
commit 72b5019416
1 changed files with 3 additions and 8 deletions

View File

@ -686,20 +686,15 @@ export class VueElement
roots.push(...this._teleportTargets)
}
const seen = new Set<HTMLSlotElement>()
const slots: HTMLSlotElement[] = []
const slots = new Set<HTMLSlotElement>()
for (const root of roots) {
const found = root.querySelectorAll<HTMLSlotElement>('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)
}
/**