From 14df5b72af0a64a17800d6af87a0773940f4bce1 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 18 Jun 2019 18:46:19 +0200 Subject: [PATCH] fix consistency bug - ref.toStruct does not correctly create GC when offset is specified --- src/structs/Item.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structs/Item.js b/src/structs/Item.js index 7d821306..2881d191 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -624,6 +624,7 @@ export class ItemRef extends AbstractStructRef { this.id = createID(id.client, id.clock + offset) this.left = createID(this.id.client, this.id.clock - 1) this.content = this.content.splice(offset) + this.length -= offset } const left = this.left === null ? null : getItemCleanEnd(transaction, store, this.left)