Skip to content

Commit 2f98264

Browse files
committed
fix(language-core): only generate model modifiers for components
fix #5119
1 parent 8db0017 commit 2f98264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/language-core/lib/codegen/template/elementProps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function* generateElementProps(
160160
}
161161
yield `,${newLine}`;
162162

163-
if (prop.name === 'model' && prop.modifiers.length) {
163+
if (isComponent && prop.name === 'model' && prop.modifiers.length) {
164164
const propertyName = prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION
165165
? !prop.arg.isStatic
166166
? `[__VLS_tryAsConstant(\`$\{${prop.arg.content}\}Modifiers\`)]`

0 commit comments

Comments
 (0)