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

RangeError: Maximum call stack size exceeded with enableUnicode: true #66

Open
mattrossman opened this issue Jul 16, 2022 · 0 comments · May be fixed by #67
Open

RangeError: Maximum call stack size exceeded with enableUnicode: true #66

mattrossman opened this issue Jul 16, 2022 · 0 comments · May be fixed by #67

Comments

@mattrossman
Copy link

I'm bundling some code from mathjs which uses unicode variable names 🥲 . In order to use this code for an inline browser target, I have to set enableUnicode: true so it can base64 encode/decode it properly. I understand this makes the size much larger.

It builds ok, but when I run it in a browser I see RangeError: Maximum call stack size exceeded in the base64 decode logic. The stacktrace indicates it occurs at the invocation of String.fromCharCode.apply() here:

return String.fromCharCode.apply(null, new Uint16Array(binaryView.buffer));

It sounds like the modern TextDecoder API is able to perform this decoding without the arguments limit. I will make a PR fix.

@mattrossman mattrossman linked a pull request Jul 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant