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

fix: use (anonymous) for empty functionNames when generating stack information in recordError() #66

Merged

Conversation

lambourn
Copy link
Contributor

If an Error's stack trace contains stack information about an arrow function () => ... then stacktrace-js will not create a functionName entry for that element. At least on Android, this leads to a runtime error.

Proposal: if the functionName is empty, use (anonymous) as the function name.

fixes #65

@cla-bot
Copy link

cla-bot bot commented Mar 16, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla.
CLA has not been signed by users: @lambourn.
After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

@lambourn
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla: yes label Mar 16, 2022
@cla-bot
Copy link

cla-bot bot commented Mar 16, 2022

The cla-bot has been summoned, and re-checked this pull request!

@lambourn lambourn changed the title fix: use (anonymous) for empty functionNames when generating stack information in recordeError() fix: use (anonymous) for empty functionNames when generating stack information in recordError() Mar 16, 2022
@NathanWalker
Copy link
Contributor

Thank you @lambourn !

@NathanWalker NathanWalker merged commit 8e2d1f0 into NativeScript:main Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants