File tree 1 file changed +3
-5
lines changed
packages/language-core/lib/codegen/template
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ export function* generateComponent(
52
52
exp : CompilerDOM . ElementNode | CompilerDOM . ExpressionNode ;
53
53
tag : string ;
54
54
offsets : [ number , number | undefined ] ;
55
- isComponentIsShorthand ?: boolean ;
56
55
} | undefined ;
57
56
58
57
if ( isComponentTag ) {
@@ -63,11 +62,13 @@ export function* generateComponent(
63
62
&& prop . arg ?. loc . source === 'is'
64
63
&& prop . exp ?. type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION
65
64
) {
65
+ if ( prop . arg . loc . end . offset === prop . exp . loc . end . offset ) {
66
+ ctx . inlayHints . push ( createVBindShorthandInlayHintInfo ( prop . exp . loc , 'is' ) ) ;
67
+ }
66
68
dynamicTagInfo = {
67
69
exp : prop . exp ,
68
70
tag : prop . exp . content ,
69
71
offsets : [ prop . exp . loc . start . offset , undefined ] ,
70
- isComponentIsShorthand : prop . arg . loc . end . offset === prop . exp . loc . end . offset
71
72
} ;
72
73
props = props . filter ( p => p !== prop ) ;
73
74
break ;
@@ -114,9 +115,6 @@ export function* generateComponent(
114
115
yield `]${ endOfLine } ` ;
115
116
}
116
117
else if ( dynamicTagInfo ) {
117
- if ( dynamicTagInfo . isComponentIsShorthand ) {
118
- ctx . inlayHints . push ( createVBindShorthandInlayHintInfo ( dynamicTagInfo . exp . loc , 'is' ) ) ;
119
- }
120
118
yield `const ${ var_originalComponent } = (` ;
121
119
yield * generateInterpolation (
122
120
options ,
You can’t perform that action at this time.
0 commit comments