diff --git a/src/utils/StructStore.js b/src/utils/StructStore.js index e2b3eca2..27cc6126 100644 --- a/src/utils/StructStore.js +++ b/src/utils/StructStore.js @@ -112,7 +112,7 @@ export const addStruct = (store, struct) => { const diffStart = struct.id.clock - skip.id.clock const diffEnd = skip.id.clock + skip.length - struct.id.clock - struct.length if (diffStart > 0) { - structs.splice(index++, 0, new Skip(createID(struct.id.client, struct.id.clock), diffStart)) + structs.splice(index++, 0, new Skip(createID(struct.id.client, skip.id.clock), diffStart)) } if (diffEnd > 0) { structs.splice(index + 1, 0, new Skip(createID(struct.id.client, struct.id.clock + struct.length), diffEnd)) diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index c2e9f7c7..8d952257 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -604,7 +604,7 @@ const arrayTransactions = [ * @param {t.TestCase} tc */ export const testRepeatGeneratingYarrayTests6 = tc => { - applyRandomTests(tc, arrayTransactions, 8) + applyRandomTests(tc, arrayTransactions, 6*3) } /**