model.Range#getTransformedByDelta
fails if operation.howMany
is 0
#4314
Labels
Milestone
model.Range#getTransformedByDelta
fails if operation.howMany
is 0
#4314
There is a bug in
model.Range#getTransformedByDelta
method: https://github.com/ckeditor/ckeditor5-engine/blob/master/src/model/range.js#L402-L408This bit of code tried to handle both
MoveDelta
(and all which extends it) andInsertDelta
in a smart way. If there's nooperation.howMany
-- useoperation.nodes.maxOffset
. Unfortunately, in some edge cases,operation.howMany
may equal0
. Then it crashes.The text was updated successfully, but these errors were encountered: