From 4652fc491f692bac282365e5e165ed2da646006d Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 20 Jun 2017 16:31:47 -0700 Subject: [PATCH] Confirm method is defined before calling --- src/compiler/program.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b292ff3965a..ac82fbba02c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -879,6 +879,10 @@ namespace ts { return oldProgram.structureIsReused = StructureIsReused.SafeModules; } } + + for (const p of oldProgram.getMissingFilePaths()) { + filesByName.set(p, undefined); + } } // update fileName -> file mapping @@ -886,10 +890,6 @@ namespace ts { filesByName.set(filePaths[i], newSourceFiles[i]); } - for (const p of oldProgram.getMissingFilePaths()) { - filesByName.set(p, undefined); - } - files = newSourceFiles; fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();