From ac3385715c0bd0941f3d364abf5ec6eca84db0da Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 26 Feb 2025 16:54:25 -0500 Subject: [PATCH] fix --- .../svelte/src/internal/client/dom/blocks/boundary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index 28a123b40c..40e3d79b2b 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -112,15 +112,15 @@ export class Boundary { // the pending or main block was rendered for a given // boundary, and hydrate accordingly queueMicrotask(() => { + this.#main_effect = this.#run(() => { + return branch(() => this.#children(this.#anchor)); + }); + if (this.#pending_count === 0) { pause_effect(/** @type {Effect} */ (this.#pending_effect), () => { this.#pending_effect = null; }); } - - this.#main_effect = this.#run(() => { - return branch(() => this.#children(this.#anchor)); - }); }); } else { this.#main_effect = branch(() => children(this.#anchor));