Skip to content

Commit

Permalink
return undefined if diff is no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHung committed Sep 29, 2024
1 parent 1025da9 commit 0d45958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syncPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const syncPlugin = <T>({
}

const diff = pmChangeSet.changedRange(amChangeSet)
if (!diff) return undefined
if (!diff || diff.from === diff.to) return undefined

// Replace the diff range in ProseMirror doc from the AutoMerge doc.
const doc = docFromSpans(adapter, spansAfter)
Expand Down

0 comments on commit 0d45958

Please sign in to comment.