diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 49a5bfc8d97..635855083c0 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -238,7 +238,7 @@ namespace ts { const cachedDiagnostics = semanticDiagnosticsPerFile.get(path); // Report the semantic diagnostics from the cache if we already have those diagnostics present if (cachedDiagnostics) { - cachedDiagnostics; + return cachedDiagnostics; } // Diagnostics werent cached, get them from program, and cache the result