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

Override toString in case this function is printed #10949

Merged
merged 3 commits into from Jan 1, 2020

Conversation

jayenashar
Copy link
Contributor

@jayenashar jayenashar commented Jan 1, 2020

Q                       A
Fixed Issues? No
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

I hit an error, but the error message pointed me to this code instead of my code. This change will put my function in the error message instead of this function. The same is done in wrapCheck() in the same file. Related to https://stackoverflow.com/questions/59543968/unexpected-return-value-from-visitor-method

@JLHwung JLHwung added pkg: traverse PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jan 1, 2020
Override `toString` immediately before returning a newFn, otherwise it will be overridden if wrapper is true

babel#10949 (comment)
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit daaa206 into babel:master Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: traverse PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants