We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34af670 commit 0789638Copy full SHA for 0789638
packages/svelte/src/internal/client/dom/template.js
@@ -245,6 +245,9 @@ export function comment() {
245
*/
246
export function append(anchor, dom) {
247
if (hydrating) return;
248
+ // We intentionally do not assign the `dom` property of the effect here because it's far too
249
+ // late. If we try, we will capture additional DOM elements that we cannot control the lifecycle
250
+ // for and will inevitably cause memory leaks. See https://github.com/sveltejs/svelte/pull/11832
251
252
anchor.before(/** @type {Node} */ (dom));
253
}
0 commit comments