File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/typescript-plugin/lib Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ export function startNamedPipeServer(
43
43
const request : Request = JSON . parse ( text ) ;
44
44
const fileName = request . args [ 0 ] ;
45
45
const project = getProject ( fileName ) ;
46
- if ( project ) {
46
+ if ( request . type === 'containsFile' ) {
47
+ connection . write ( JSON . stringify ( ! ! project ) ) ;
48
+ }
49
+ else if ( project ) {
47
50
const requestContext = {
48
51
typescript : ts ,
49
52
languageService : project . info . languageService ,
@@ -52,11 +55,7 @@ export function startNamedPipeServer(
52
55
isTsPlugin : true ,
53
56
getFileId : ( fileName : string ) => fileName ,
54
57
} ;
55
- if ( request . type === 'containsFile' ) {
56
- const result = ! ! getProject ( fileName ) ;
57
- connection . write ( JSON . stringify ( result ?? null ) ) ;
58
- }
59
- else if ( request . type === 'collectExtractProps' ) {
58
+ if ( request . type === 'collectExtractProps' ) {
60
59
const result = collectExtractProps . apply ( requestContext , request . args as any ) ;
61
60
connection . write ( JSON . stringify ( result ?? null ) ) ;
62
61
}
You can’t perform that action at this time.
0 commit comments