1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore(lsp): respect shouldCreateNewSourceFile parameter (#23515)

This commit is contained in:
David Sherret 2024-04-23 18:16:26 -04:00 committed by GitHub
parent 90a167a1a2
commit cfa0fcd8c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -609,7 +609,7 @@ delete Object.prototype.__proto__;
specifier,
languageVersion,
_onError,
_shouldCreateNewSourceFile,
shouldCreateNewSourceFile,
) {
if (logDebug) {
debug(
@ -624,6 +624,10 @@ 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;