From e1723302f27b027ef5b964699f77258cde960634 Mon Sep 17 00:00:00 2001 From: FZambia Date: Thu, 27 Jun 2024 18:46:10 +0300 Subject: [PATCH] fix max call stack exceeded when applying fossil delta --- src/fossil.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fossil.ts b/src/fossil.ts index 006e1da0..f6dc4bbe 100644 --- a/src/fossil.ts +++ b/src/fossil.ts @@ -72,7 +72,8 @@ class Writer { // Copy from array at start to end. putArray(a: ByteArray, start: number, end: number) { - this.a.push(...a.slice(start, end)); + // TODO: optimize. + for (let i = start; i < end; i++) this.a.push(a[i]); } }