Skip to content

Commit

Permalink
Revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaretskyi committed Dec 19, 2023
1 parent 51daa3d commit b255197
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/codeMirrorToAm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ export default (
// Otherwise later on `automerge.diff` will return empty patches that result in a no-op but still mess up the selection.
let hasChanges = false
for (const tr of transactions) {
tr.changes.iterChanges(() => {
hasChanges = true
})
if(!tr.changes.empty) {
tr.changes.iterChanges(() => {
hasChanges = true
})
}
}

if (!hasChanges) {
Expand Down

0 comments on commit b255197

Please sign in to comment.