Skip to content

Commit 4620a28

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

File tree

1 file changed

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

1 file changed

+6
-1
lines changed

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

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

720720
dirty = false;
721721

722+
if (!oldProgram) {
723+
changedFilesForExportCache.clear();
724+
return;
725+
}
726+
722727
for (const fileName of changedFilesForExportCache) {
723-
const oldFile = oldProgram?.getSourceFile(fileName);
728+
const oldFile = oldProgram.getSourceFile(fileName);
724729
const newFile = program?.getSourceFile(fileName);
725730

726731
// file for another tsconfig

0 commit comments

Comments
 (0)