Merge pull request #18659 from overleaf/em-crop-comments-tracked-deletes

Crop comments when processing tracked deletes

GitOrigin-RevId: 662c9ed86a8ed4959d1671ce466548487f334f45
This commit is contained in:
Eric Mc Sween
2024-06-05 08:03:53 +00:00
committed by Copybot
parent cb716b1b59
commit c07f4cf095
5 changed files with 214 additions and 7 deletions
@@ -23,6 +23,12 @@ class AddCommentOperation extends EditOperation {
constructor(commentId, ranges, resolved = false) {
super()
for (const range of ranges) {
if (range.isEmpty()) {
throw new Error("AddCommentOperation can't be built with empty ranges")
}
}
/** @readonly */
this.commentId = commentId