Skip to content

Commit 65b0381

Browse files
committed
tidy up
1 parent 8f47fa8 commit 65b0381

File tree

1 file changed

+13
-20
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+13
-20
lines changed

packages/svelte/src/internal/client/dom/blocks/boundary.js

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export function boundary(node, props, children) {
4949
}
5050

5151
export class Boundary {
52-
inert = false;
5352
pending = false;
5453

5554
/** @type {Boundary | null} */
@@ -85,9 +84,7 @@ export class Boundary {
8584
#pending_count = 0;
8685
#is_creating_fallback = false;
8786

88-
/**
89-
* @type {Source<number> | null}
90-
*/
87+
/** @type {Source<number> | null} */
9188
#effect_pending = null;
9289

9390
#effect_pending_subscriber = createSubscriber(() => {
@@ -208,27 +205,23 @@ export class Boundary {
208205
}
209206
}
210207

211-
commit() {
212-
this.pending = false;
213-
214-
if (this.#pending_effect) {
215-
pause_effect(this.#pending_effect, () => {
216-
this.#pending_effect = null;
217-
});
218-
}
219-
220-
if (this.#offscreen_fragment) {
221-
this.#anchor.before(this.#offscreen_fragment);
222-
this.#offscreen_fragment = null;
223-
}
224-
}
225-
226208
/** @param {1 | -1} d */
227209
#update_pending_count(d) {
228210
this.#pending_count += d;
229211

230212
if (this.#pending_count === 0) {
231-
this.commit();
213+
this.pending = false;
214+
215+
if (this.#pending_effect) {
216+
pause_effect(this.#pending_effect, () => {
217+
this.#pending_effect = null;
218+
});
219+
}
220+
221+
if (this.#offscreen_fragment) {
222+
this.#anchor.before(this.#offscreen_fragment);
223+
this.#offscreen_fragment = null;
224+
}
232225
}
233226
}
234227

0 commit comments

Comments
 (0)