File tree 1 file changed +3
-6
lines changed
packages/language-core/lib/codegen/template
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,8 @@ export function* generateElementEvents(
25
25
if (
26
26
prop . type === CompilerDOM . NodeTypes . DIRECTIVE
27
27
&& (
28
- prop . name === 'model'
29
- || prop . name === 'on'
30
- && prop . arg ?. type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION
31
- && ! prop . arg . loc . source . startsWith ( '[' )
32
- && ! prop . arg . loc . source . endsWith ( ']' )
28
+ prop . name === 'on' && ( prop . arg ?. type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION && prop . arg . isStatic )
29
+ || prop . name === 'model' && ( ! prop . arg || prop . arg . type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION && prop . arg . isStatic )
33
30
)
34
31
) {
35
32
ctx . currentComponent ! . used = true ;
@@ -190,7 +187,7 @@ export function* generateModelEventExpression(
190
187
prop . exp . content ,
191
188
prop . exp . loc . start . offset ,
192
189
prop . exp . loc
193
- )
190
+ ) ;
194
191
yield ` = $event)` ;
195
192
}
196
193
else {
You can’t perform that action at this time.
0 commit comments