Skip to content

Commit e36f0e8

Browse files
committed
slight optimization. no cache to clear for the first run
1 parent 9b012d3 commit e36f0e8

File tree

1 file changed

+5
-1
lines changed
  • packages/language-server/src/plugins/typescript

1 file changed

+5
-1
lines changed

packages/language-server/src/plugins/typescript/service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,12 @@ async function createLanguageService(
719719

720720
dirty = false;
721721

722+
if (!oldProgram) {
723+
return;
724+
}
725+
722726
for (const fileName of changedFilesForExportCache) {
723-
const oldFile = oldProgram?.getSourceFile(fileName);
727+
const oldFile = oldProgram.getSourceFile(fileName);
724728
const newFile = program?.getSourceFile(fileName);
725729

726730
// file for another tsconfig

0 commit comments

Comments
 (0)