Skip to content

Commit 028f573

Browse files
committed
fix(language-core): treat <component> without is prop as normal component
1 parent c022037 commit 028f573

File tree

1 file changed

+1
-3
lines changed
  • packages/language-core/lib/codegen/template

1 file changed

+1
-3
lines changed

packages/language-core/lib/codegen/template/element.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function* generateComponent(
131131
);
132132
}
133133
yield `)${endOfLine}`;
134-
} else if (!isComponentTag) {
134+
} else {
135135
yield `const ${componentOriginalVar} = ({} as __VLS_WithComponent<'${
136136
getCanonicalComponentName(node.tag)
137137
}', __VLS_LocalComponents, `;
@@ -186,8 +186,6 @@ export function* generateComponent(
186186
);
187187
yield `${endOfLine}`;
188188
}
189-
} else {
190-
yield `const ${componentOriginalVar} = {} as any${endOfLine}`;
191189
}
192190

193191
yield `// @ts-ignore${newLine}`;

0 commit comments

Comments
 (0)