splitting an item must always happen inside a transaction, because we always need to check if we can merge it back

This commit is contained in:
Kevin Jahns
2019-04-11 00:23:08 +02:00
parent 9fe47e98d5
commit 2ef11a5344
18 changed files with 72 additions and 63 deletions

View File

@@ -170,7 +170,7 @@ export const transact = (y, f) => {
const deleteItem = deleteItems[di]
for (let si = findIndexSS(structs, deleteItem.clock); si < structs.length; si++) {
const struct = structs[si]
if (deleteItem.clock + deleteItem.len < struct.id.clock) {
if (deleteItem.clock + deleteItem.len <= struct.id.clock) {
break
}
if (struct.deleted && struct instanceof AbstractItem && (struct.constructor !== ItemDeleted || (struct.parent._item !== null && struct.parent._item.deleted))) {