async-changeset
Rich Harris 7 months ago
parent 2d11cd32c3
commit 5235642729

@ -55,7 +55,6 @@ export function boundary(node, props, children) {
} }
export class Boundary { export class Boundary {
suspended = false;
inert = false; inert = false;
/** @type {Boundary | null} */ /** @type {Boundary | null} */
@ -145,7 +144,6 @@ export class Boundary {
this.#main_effect = branch(() => children(this.#anchor)); this.#main_effect = branch(() => children(this.#anchor));
if (this.#pending_count > 0) { if (this.#pending_count > 0) {
this.suspended = true;
this.#show_pending_snippet(); this.#show_pending_snippet();
} }
} }
@ -221,8 +219,8 @@ export class Boundary {
increment() { increment() {
if (active_fork) { if (active_fork) {
active_fork.increment(); active_fork.increment();
} else if (this.#pending_count++ === 0) { } else {
this.#show_pending_snippet(); this.#pending_count++ === 0;
} }
} }
@ -241,7 +239,7 @@ export class Boundary {
const reset = () => { const reset = () => {
this.#pending_count = 0; this.#pending_count = 0;
this.suspended = false; this.values.clear();
if (this.#failed_effect !== null) { if (this.#failed_effect !== null) {
pause_effect(this.#failed_effect, () => { pause_effect(this.#failed_effect, () => {
@ -260,7 +258,6 @@ export class Boundary {
}); });
if (this.#pending_count > 0) { if (this.#pending_count > 0) {
this.suspended = true;
this.#show_pending_snippet(); this.#show_pending_snippet();
} }
}; };

Loading…
Cancel
Save