Skip to content

Commit a06e1c5

Browse files
committed
Remove non null assertion on oldSourceFile.resolvedModules
Fixes microsoft#37938
1 parent a96c8ec commit a06e1c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ namespace ts {
11101110
const moduleName = moduleNames[i];
11111111
// If the source file is unchanged and doesnt have invalidated resolution, reuse the module resolutions
11121112
if (file === oldSourceFile && !hasInvalidatedResolution(oldSourceFile.path)) {
1113-
const oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules!.get(moduleName);
1113+
const oldResolvedModule = getResolvedModule(oldSourceFile, moduleName);
11141114
if (oldResolvedModule) {
11151115
if (isTraceEnabled(options, host)) {
11161116
trace(host, Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);

0 commit comments

Comments
 (0)