Skip to content

Commit

Permalink
fix: don't apply edits for unchanged files when replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Nov 3, 2023
1 parent 270fe03 commit cbb50cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/AstxRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@ export class AstxRunner extends TypedEmitter<AstxRunnerEvents> {
const {
result: { file, source = '', transformed, matches, reports, error },
} = next
if (transformed) {
this.transformResults.set(file, {
source,
transformed,
})
}
if (
!matches?.length &&
!reports?.length &&
Expand All @@ -248,6 +242,12 @@ export class AstxRunner extends TypedEmitter<AstxRunnerEvents> {
) {
continue
}
if (transformed != null && transformed !== source) {
this.transformResults.set(file, {
source,
transformed,
})
}
const event: TransformResultEvent = {
file: vscode.Uri.file(file),
source,
Expand Down

0 comments on commit cbb50cd

Please sign in to comment.