From 696de02cd3c737f01942d31aab4c395af98a9969 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Mon, 13 Jan 2025 20:32:43 +0000 Subject: [PATCH] fix: ensure svelte boundaries are always appended to parent effects --- packages/svelte/src/internal/client/dom/blocks/boundary.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index 7f4f000dceae..6a9856171078 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -1,6 +1,6 @@ /** @import { Effect, TemplateNode, } from '#client' */ -import { BOUNDARY_EFFECT, EFFECT_TRANSPARENT } from '../../constants.js'; +import { BOUNDARY_EFFECT, EFFECT_HAS_DERIVED, EFFECT_TRANSPARENT } from '../../constants.js'; import { block, branch, destroy_effect, pause_effect } from '../../reactivity/effects.js'; import { active_effect, @@ -117,6 +117,9 @@ export function boundary(node, props, boundary_fn) { is_creating_fallback = false; }); }); + // Since the boundary is lazy, so we need to ensure the parent + // knows that is will have children in the future + boundary.f |= EFFECT_HAS_DERIVED; } };