Skip to content

Commit

Permalink
fix(language-core): only generate model modifiers for components
Browse files Browse the repository at this point in the history
fix #5119
  • Loading branch information
KazariEX committed Jan 9, 2025
1 parent 8db0017 commit 2f98264
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function* generateElementProps(
}
yield `,${newLine}`;

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

0 comments on commit 2f98264

Please sign in to comment.