Skip to content

Commit 19694d6

Browse files
committed
fix: ignore comments for implicit children prop
#2263
1 parent 3d61533 commit 19694d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte2tsx/src/htmlxtojsx_v2/nodes/SnippetBlock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function handleImplicitChildren(componentNode: BaseNode, component: Inlin
140140
continue;
141141
}
142142
}
143-
if (child.type === 'Text' && child.data.trim() === '') {
143+
if (child.type === 'Comment' || (child.type === 'Text' && child.data.trim() === '')) {
144144
continue;
145145
}
146146
if (child.type !== 'SnippetBlock') {

0 commit comments

Comments
 (0)