summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tsc/99_main_compiler.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js
index 97378076a..e5b51cab0 100644
--- a/cli/tsc/99_main_compiler.js
+++ b/cli/tsc/99_main_compiler.js
@@ -609,7 +609,9 @@ delete Object.prototype.__proto__;
specifier,
languageVersion,
_onError,
- shouldCreateNewSourceFile,
+ // this is not used by the lsp because source
+ // files are created in the document registry
+ _shouldCreateNewSourceFile,
) {
if (logDebug) {
debug(
@@ -624,10 +626,6 @@ delete Object.prototype.__proto__;
// Needs the original specifier
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
- if (shouldCreateNewSourceFile) {
- sourceFileCache.delete(specifier);
- }
-
let sourceFile = sourceFileCache.get(specifier);
if (sourceFile) {
return sourceFile;