[applyDelta] fix skipping over uncountables

This commit is contained in:
Kevin Jahns
2026-03-24 18:16:58 +01:00
parent bf8450a7b3
commit c847d9215f

View File

@@ -1047,7 +1047,7 @@ export class YType {
deleteText(transaction, currPos, op.delete)
} else if (delta.$modifyOp.check(op)) {
let item = currPos.right
while (item?.deleted && !item.countable) { item = item.next }
while (item != null && (item.deleted || !item.countable)) { item = item.next }
if (item == null || item.content.constructor !== ContentType) { error.unexpectedCase() }
/** @type {ContentType} */ (item.content).type.applyDelta(op.value)
currPos.formatText(transaction, /** @type {any} */ (this), 1, op.format || {})