chore: tidy up (#17863)

small tweaks, will self-merge
pull/17864/head
Rich Harris 7 months ago committed by GitHub
parent 61a443f1fa
commit 9066b75c01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -225,7 +225,6 @@ export class Boundary {
fragment.append(anchor); fragment.append(anchor);
this.#main_effect = this.#run(() => { this.#main_effect = this.#run(() => {
Batch.ensure();
return branch(() => this.#children(anchor)); return branch(() => this.#children(anchor));
}); });
@ -320,6 +319,7 @@ export class Boundary {
set_component_context(this.#effect.ctx); set_component_context(this.#effect.ctx);
try { try {
Batch.ensure();
return fn(); return fn();
} catch (e) { } catch (e) {
handle_error(e); handle_error(e);
@ -445,9 +445,6 @@ export class Boundary {
} }
this.#run(() => { this.#run(() => {
// If the failure happened while flushing effects, current_batch can be null
Batch.ensure();
this.#render(); this.#render();
}); });
}; };
@ -464,8 +461,6 @@ export class Boundary {
if (failed) { if (failed) {
this.#failed_effect = this.#run(() => { this.#failed_effect = this.#run(() => {
Batch.ensure();
try { try {
return branch(() => { return branch(() => {
// errors in `failed` snippets cause the boundary to error again // errors in `failed` snippets cause the boundary to error again

@ -43,7 +43,6 @@ export function flatten(blockers, sync, async, fn) {
return; return;
} }
var batch = current_batch;
var parent = /** @type {Effect} */ (active_effect); var parent = /** @type {Effect} */ (active_effect);
var restore = capture(); var restore = capture();

@ -14,7 +14,6 @@ import {
MAYBE_DIRTY, MAYBE_DIRTY,
DERIVED, DERIVED,
EAGER_EFFECT, EAGER_EFFECT,
HEAD_EFFECT,
ERROR_VALUE, ERROR_VALUE,
MANAGED_EFFECT, MANAGED_EFFECT,
REACTION_RAN REACTION_RAN

Loading…
Cancel
Save