From 65b038119557a2c2e6ea8b159fc76e9f936a8e2e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 13 Jul 2025 14:19:46 -0400 Subject: [PATCH] tidy up --- .../internal/client/dom/blocks/boundary.js | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index 69a5bd45ad..f270e3563a 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -49,7 +49,6 @@ export function boundary(node, props, children) { } export class Boundary { - inert = false; pending = false; /** @type {Boundary | null} */ @@ -85,9 +84,7 @@ export class Boundary { #pending_count = 0; #is_creating_fallback = false; - /** - * @type {Source | null} - */ + /** @type {Source | null} */ #effect_pending = null; #effect_pending_subscriber = createSubscriber(() => { @@ -208,27 +205,23 @@ export class Boundary { } } - commit() { - this.pending = false; - - if (this.#pending_effect) { - pause_effect(this.#pending_effect, () => { - this.#pending_effect = null; - }); - } - - if (this.#offscreen_fragment) { - this.#anchor.before(this.#offscreen_fragment); - this.#offscreen_fragment = null; - } - } - /** @param {1 | -1} d */ #update_pending_count(d) { this.#pending_count += d; if (this.#pending_count === 0) { - this.commit(); + this.pending = false; + + if (this.#pending_effect) { + pause_effect(this.#pending_effect, () => { + this.#pending_effect = null; + }); + } + + if (this.#offscreen_fragment) { + this.#anchor.before(this.#offscreen_fragment); + this.#offscreen_fragment = null; + } } }