Skip to content

Commit f82a59b

Browse files
committed
only create block when necessary
1 parent a77bf50 commit f82a59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ export function SvelteBoundary(node, context) {
8080

8181
context.state.template.push('<!>');
8282
context.state.init.push(
83-
snippet_statements ? b.block([...snippet_statements, boundary]) : boundary
83+
snippet_statements.length > 0 ? b.block([...snippet_statements, boundary]) : boundary
8484
);
8585
}

0 commit comments

Comments
 (0)