mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore(lsp): respect shouldCreateNewSourceFile parameter (#23515)
This commit is contained in:
parent
90a167a1a2
commit
cfa0fcd8c8
1 changed files with 5 additions and 1 deletions
|
@ -609,7 +609,7 @@ delete Object.prototype.__proto__;
|
||||||
specifier,
|
specifier,
|
||||||
languageVersion,
|
languageVersion,
|
||||||
_onError,
|
_onError,
|
||||||
_shouldCreateNewSourceFile,
|
shouldCreateNewSourceFile,
|
||||||
) {
|
) {
|
||||||
if (logDebug) {
|
if (logDebug) {
|
||||||
debug(
|
debug(
|
||||||
|
@ -624,6 +624,10 @@ delete Object.prototype.__proto__;
|
||||||
// Needs the original specifier
|
// Needs the original specifier
|
||||||
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
|
specifier = normalizedToOriginalMap.get(specifier) ?? specifier;
|
||||||
|
|
||||||
|
if (shouldCreateNewSourceFile) {
|
||||||
|
sourceFileCache.delete(specifier);
|
||||||
|
}
|
||||||
|
|
||||||
let sourceFile = sourceFileCache.get(specifier);
|
let sourceFile = sourceFileCache.get(specifier);
|
||||||
if (sourceFile) {
|
if (sourceFile) {
|
||||||
return sourceFile;
|
return sourceFile;
|
||||||
|
|
Loading…
Reference in a new issue