fix: reuse already attached attachments from spread attributes

pull/15951/head
ComputerGuy 4 months ago
parent 42e7e8168d
commit 049b5a09bb

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: reuse already attached attachments from spread attributes

@ -448,7 +448,7 @@ export function set_attributes(element, prev, next, css_hash, skip_warning = fal
}
for (let symbol of Object.getOwnPropertySymbols(next)) {
if (symbol.description === ATTACHMENT_KEY) {
if (symbol.description === ATTACHMENT_KEY && !(key in prev)) {
attach(element, () => next[symbol]);
}
}

Loading…
Cancel
Save