File tree 4 files changed +20
-217
lines changed
language-service/lib/plugins
typescript-plugin/lib/requests
4 files changed +20
-217
lines changed Original file line number Diff line number Diff line change
1
+ link-workspace-packages = true
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ export function create(
449
449
}
450
450
451
451
for ( const binding of scriptSetupRanges ?. bindings ?? [ ] ) {
452
- const name = vueCode . sfc . scriptSetup ! . content . substring ( binding . start , binding . end ) ;
452
+ const name = vueCode . sfc . scriptSetup . content . substring ( binding . start , binding . end ) ;
453
453
if ( casing . tag === TagNameCasing . Kebab ) {
454
454
names . add ( hyphenateTag ( name ) ) ;
455
455
}
@@ -498,8 +498,8 @@ export function create(
498
498
return [ ] ;
499
499
}
500
500
let ctxVars = [
501
- ..._tsCodegen . scriptRanges ( ) ?. bindings . map ( binding => vueCode . sfc . script ! . content . substring ( binding . start , binding . end ) ) ?? [ ] ,
502
- ..._tsCodegen . scriptSetupRanges ( ) ?. bindings . map ( binding => vueCode . sfc . scriptSetup ! . content . substring ( binding . start , binding . end ) ) ?? [ ] ,
501
+ ..._tsCodegen . scriptRanges ( ) ?. bindings . map ( binding => vueCode . sfc . script . content . substring ( binding . start , binding . end ) ) ?? [ ] ,
502
+ ..._tsCodegen . scriptSetupRanges ( ) ?. bindings . map ( binding => vueCode . sfc . scriptSetup . content . substring ( binding . start , binding . end ) ) ?? [ ] ,
503
503
...templateContextProps ,
504
504
] ;
505
505
ctxVars = [ ...new Set ( ctxVars ) ] ;
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ export function collectExtractProps(
47
47
const source = map . getSourceOffset ( name . getEnd ( ) - ( isTsPlugin ? volarFile . snapshot . getLength ( ) : 0 ) ) ;
48
48
if (
49
49
source
50
- && source [ 0 ] >= sfc . template ! . startTagEnd + templateCodeRange [ 0 ]
51
- && source [ 0 ] <= sfc . template ! . startTagEnd + templateCodeRange [ 1 ]
50
+ && source [ 0 ] >= sfc . template . startTagEnd + templateCodeRange [ 0 ]
51
+ && source [ 0 ] <= sfc . template . startTagEnd + templateCodeRange [ 1 ]
52
52
&& isSemanticTokensEnabled ( source [ 1 ] . data )
53
53
) {
54
54
if ( ! result . has ( name . text ) ) {
You can’t perform that action at this time.
0 commit comments