async-changeset
Rich Harris 7 months ago
parent e9962194f8
commit eb465b56ed

@ -532,11 +532,3 @@ function exit() {
set_active_reaction(null); set_active_reaction(null);
set_component_context(null); set_component_context(null);
} }
/**
* @param {Effect} boundary
*/
export function commit_boundary(boundary) {
// @ts-ignore
boundary.fn?.(COMMIT);
}

@ -50,7 +50,7 @@ import {
set_component_context, set_component_context,
set_dev_current_component_function set_dev_current_component_function
} from './context.js'; } from './context.js';
import { Boundary, commit_boundary } from './dom/blocks/boundary.js'; import { Boundary } from './dom/blocks/boundary.js';
import * as w from './warnings.js'; import * as w from './warnings.js';
const FLUSH_MICROTASK = 0; const FLUSH_MICROTASK = 0;
@ -831,11 +831,13 @@ function process_effects(effect, collected_effects, boundary) {
boundary.add_effect(current_effect); boundary.add_effect(current_effect);
} else if ((flags & BOUNDARY_EFFECT) !== 0) { } else if ((flags & BOUNDARY_EFFECT) !== 0) {
// @ts-expect-error // @ts-expect-error
process_effects(current_effect, collected_effects, current_effect.fn.boundary); var b = /** @type {Boundary} */ (current_effect.fn.boundary);
process_effects(current_effect, collected_effects, b);
if ((current_effect.f & BOUNDARY_SUSPENDED) === 0) { if ((current_effect.f & BOUNDARY_SUSPENDED) === 0) {
// no more async work to happen // no more async work to happen
commit_boundary(current_effect); b.commit();
} }
} else if ((flags & RENDER_EFFECT) !== 0) { } else if ((flags & RENDER_EFFECT) !== 0) {
if (is_branch) { if (is_branch) {

Loading…
Cancel
Save