Skip to content

Commit 5ddfe77

Browse files
committed
tweak
1 parent 99ae4c9 commit 5ddfe77

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ 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+
8086
const block = /** @type {BlockStatement} */ (
8187
context.visit(
8288
{

0 commit comments

Comments
 (0)