Skip to content

Commit ecf8751

Browse files
committed
Check for language serivice enabled when including source files
1 parent 746b01e commit ecf8751

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,12 +1427,12 @@ namespace ts.server {
14271427

14281428
/* @internal */
14291429
useSourceInsteadOfReferenceRedirect() {
1430-
return true;
1430+
return !!this.languageServiceEnabled;
14311431
}
14321432

14331433
fileExists(file: string): boolean {
14341434
// Project references go to source file instead of .d.ts file
1435-
if (this.getSourceOfProjectReferenceRedirect) {
1435+
if (this.languageServiceEnabled && this.getSourceOfProjectReferenceRedirect) {
14361436
const source = this.getSourceOfProjectReferenceRedirect(file);
14371437
if (source) return isString(source) ? super.fileExists(source) : true;
14381438
}

0 commit comments

Comments
 (0)