Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maximum call stack size exceeded when having a lot of errors #344

Closed
dpralon opened this issue Jun 22, 2021 · 0 comments · Fixed by #363
Closed

maximum call stack size exceeded when having a lot of errors #344

dpralon opened this issue Jun 22, 2021 · 0 comments · Fixed by #363
Assignees
Labels

Comments

@dpralon
Copy link

dpralon commented Jun 22, 2021

If I have a lot of errors when validating an array with a lot of documents, the function ValidatorResult.prototype.importErrors in helpers.js crashes when doing : Array.prototype.push.apply(this.errors, res.errors) because apply will push as many parameters as the number of elements in the res.errors array, on the stack, hence the exception.
This line can be replaced with : this.errors = this.errors.concat(res.errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants