fixed merging and adapted writeStructs to write end of message

This commit is contained in:
Kevin Jahns
2019-04-07 12:47:04 +02:00
parent c635963747
commit 90b3fa9dd9
10 changed files with 85 additions and 81 deletions

View File

@@ -13,7 +13,6 @@ import {
changeItemRefOffset,
GC,
splitItem,
compareIDs,
addToDeleteSet,
StructStore, Transaction, ID, AbstractType // eslint-disable-line
} from '../internals.js'
@@ -80,7 +79,7 @@ export class ItemDeleted extends AbstractItem {
* @return {boolean}
*/
mergeWith (right) {
if (compareIDs(right.origin, this.lastId) && this.right === right && compareIDs(this.rightOrigin, right.rightOrigin)) {
if (super.mergeWith(right)) {
this._len += right._len
return true
}