Skip to content

Commit

Permalink
chore: don't update if snapshot no change
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 16, 2022
1 parent 276492b commit 0b570b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vue-language-core/src/sourceFile.ts
Expand Up @@ -400,6 +400,10 @@ export function createSourceFile(
}
function update(newScriptSnapshot: ts.IScriptSnapshot) {

if (newScriptSnapshot === snapshot.value) {
return;
}

const change = newScriptSnapshot.getChangeRange(snapshot.value);
snapshot.value = newScriptSnapshot;

Expand Down

0 comments on commit 0b570b0

Please sign in to comment.