From 715be7910d5e34871ce9100f7e9a20994382eddc Mon Sep 17 00:00:00 2001 From: Hakan Shehu Date: Tue, 21 Jan 2025 19:24:23 +0100 Subject: [PATCH] Fix an out of bound exception in crdt array operations --- packages/crdt/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/crdt/src/index.ts b/packages/crdt/src/index.ts index 40d324ee..7e237671 100644 --- a/packages/crdt/src/index.ts +++ b/packages/crdt/src/index.ts @@ -262,7 +262,7 @@ export class YDoc { } if (yArray.length > length) { - yArray.delete(yArray.length - 1, yArray.length - length); + yArray.delete(length, yArray.length - length); } }