Skip to content

Commit

Permalink
fix: adjust diff behavior change
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 20, 2024
1 parent 5d3b46e commit 1c401ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/conflicter/src/conflicter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class Conflicter {
modified = changes.some(change => change.value?.trim() && (change.added || change.removed));
} else {
changes = diffLines(actual.toString(), contents.toString(), this.diffOptions);
modified = (changes.length > 1 || changes[0].added || changes[0].removed) ?? false;
modified = (changes && changes.length > 0 && (changes.length > 1 || changes[0].added || changes[0].removed)) ?? false;
}

if (modified) {
Expand Down

0 comments on commit 1c401ed

Please sign in to comment.