Skip to content

Commit 24cd820

Browse files
committed
tweak
1 parent 5ddfe77 commit 24cd820

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBoundary.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ export function SvelteBoundary(node, context) {
7777
}
7878
}
7979

80-
// Skip making a boundary is there are no props
81-
if (props_and_spreads.length === 0) {
82-
context.state.init.push(.../** @type {BlockStatement} */ (context.visit(node.fragment)).body);
83-
return;
84-
}
85-
8680
const block = /** @type {BlockStatement} */ (
8781
context.visit(
8882
{

packages/svelte/src/internal/client/runtime.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,10 @@ export function update_effect(effect) {
482482
} catch (error) {
483483
handle_error(/** @type {Error} */ (error), effect, previous_component_context);
484484

485-
if (effect.parent !== null && (effect.parent.f & BOUNDARY_EFFECT) === 0) {
485+
if (
486+
(flags & ROOT_EFFECT) !== 0 ||
487+
(effect.parent !== null && (effect.parent.f & BOUNDARY_EFFECT) === 0)
488+
) {
486489
throw error;
487490
}
488491
} finally {

0 commit comments

Comments
 (0)