We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49aa565 commit a7e820aCopy full SHA for a7e820a
packages/language-core/lib/codegen/template/templateChild.ts
@@ -129,6 +129,9 @@ function* collectSingleRootNodes(
129
options: TemplateCodegenOptions,
130
children: CompilerDOM.TemplateChildNode[],
131
): Generator<CompilerDOM.ElementNode | null> {
132
+ // Exclude the effect of comments on the root node
133
+ children = children.filter(node => node.type !== CompilerDOM.NodeTypes.COMMENT);
134
+
135
if (children.length !== 1) {
136
// "null" is used to determine whether the component is not always has a single root
137
if (children.length > 1) {
0 commit comments