Skip to content

Commit

Permalink
perf: fix always check .ts fileExists on update
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jul 24, 2022
1 parent a9761a0 commit 07f3bd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-language-core/src/lsContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function createLanguageContext(

// .ts / .js / .d.ts / .json ...
for (const tsFileVersion of tsFileVersions) {
if (!vueFileNames.has(tsFileVersion[0]) && !host.fileExists?.(tsFileVersion[0])) {
if (!tsFileNames.has(tsFileVersion[0]) && !host.getScriptSnapshot(tsFileVersion[0])) {
// delete
tsFileVersions.delete(tsFileVersion[0]);
tsFileUpdated = true;
Expand Down

0 comments on commit 07f3bd5

Please sign in to comment.