From eb465b56ed0a53c94921d8b74cf8cc3983cc7cf3 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 11 Feb 2025 09:23:08 -0500 Subject: [PATCH] more --- .../svelte/src/internal/client/dom/blocks/boundary.js | 8 -------- packages/svelte/src/internal/client/runtime.js | 8 +++++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index 14f81ec6f6..364a39826d 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -532,11 +532,3 @@ function exit() { set_active_reaction(null); set_component_context(null); } - -/** - * @param {Effect} boundary - */ -export function commit_boundary(boundary) { - // @ts-ignore - boundary.fn?.(COMMIT); -} diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 706b8da25b..b281eb104c 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -50,7 +50,7 @@ import { set_component_context, set_dev_current_component_function } 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'; const FLUSH_MICROTASK = 0; @@ -831,11 +831,13 @@ function process_effects(effect, collected_effects, boundary) { boundary.add_effect(current_effect); } else if ((flags & BOUNDARY_EFFECT) !== 0) { // @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) { // no more async work to happen - commit_boundary(current_effect); + b.commit(); } } else if ((flags & RENDER_EFFECT) !== 0) { if (is_branch) {