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));