From b99e843e2a3c4e91997509d480a4f045183aa646 Mon Sep 17 00:00:00 2001 From: Karl-Aksel Puulmann Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] Fix RangeError: Maximum call stack size exceeded (#479) Saw this line cause issues in production, causing the following error: ``` RangeError Maximum call stack size exceeded ``` I believe this is caused by javascript engine max argument length - see note from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply#using_apply_and_built-in_functions > The consequences of applying a function with too many arguments (that is, more than tens of thousands of arguments) varies across engines. (The JavaScriptCore engine has hard-coded argument limit of 65536. --- src/replay/timer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replay/timer.ts b/src/replay/timer.ts index 1ec786da..e5eefa04 100644 --- a/src/replay/timer.ts +++ b/src/replay/timer.ts @@ -30,7 +30,7 @@ export class Timer { * @param actions */ public addActions(actions: actionWithDelay[]) { - this.actions.push(...actions); + this.actions = this.actions.concat(actions); } public start() {