From b50bdde4bf8ea01bcea95a81ad7aa552b6a47be5 Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Thu, 9 Apr 2026 09:09:13 +0200 Subject: [PATCH] fix: `HMR_ANCHOR` use operations methods --- packages/svelte/src/internal/client/dom/blocks/branches.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/branches.js b/packages/svelte/src/internal/client/dom/blocks/branches.js index 94f05ab27c..5173bd9243 100644 --- a/packages/svelte/src/internal/client/dom/blocks/branches.js +++ b/packages/svelte/src/internal/client/dom/blocks/branches.js @@ -117,7 +117,7 @@ export class BranchManager { if (DEV) { // Tell hmr.js about the anchor it should use for updates, // since the initial one will be removed - /** @type {any} */ (offscreen.fragment.lastChild)[HMR_ANCHOR] = this.anchor; + /** @type {any} */ (get_last_child(offscreen.fragment))[HMR_ANCHOR] = this.anchor; } // remove the anchor...