Skip to content

Commit

Permalink
Fix RangeError: Maximum call stack size exceeded (#479)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
macobo authored Feb 8, 2021
1 parent cc15be1 commit 5021c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/replay/timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5021c7a

Please sign in to comment.