Skip to content

Commit 4652fc4

Browse files
committed
Confirm method is defined before calling
1 parent a39e969 commit 4652fc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/program.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -879,17 +879,17 @@ namespace ts {
879879
return oldProgram.structureIsReused = StructureIsReused.SafeModules;
880880
}
881881
}
882+
883+
for (const p of oldProgram.getMissingFilePaths()) {
884+
filesByName.set(p, undefined);
885+
}
882886
}
883887

884888
// update fileName -> file mapping
885889
for (let i = 0; i < newSourceFiles.length; i++) {
886890
filesByName.set(filePaths[i], newSourceFiles[i]);
887891
}
888892

889-
for (const p of oldProgram.getMissingFilePaths()) {
890-
filesByName.set(p, undefined);
891-
}
892-
893893
files = newSourceFiles;
894894
fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
895895

0 commit comments

Comments
 (0)