-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Use a closure to bind argument to callback in ReactErrorUtils #8363
Conversation
This way the fake event isn't being implicitly passed into the event handler
Feel free to add a test for ReactErrorUtils if one doesn't exist already. You could also look at change history to see if there were any related tests introduced with this file in the first place. Can you confirm single argument matches production behavior? |
@gaearon I added test for |
Lint is failing. |
Tagging as minor since somebody might have accidentally relied on that. |
Linter fails. |
Add fiber test report Linting fixes
996e59d
to
f293884
Compare
@gaearon fixed 👍 |
LGTM |
…ok#8363) * Use a closure to bind gaurded callback This way the fake event isn't being implicitly passed into the event handler * Add tests for ReactErrorUtils Add fiber test report Linting fixes
See discussion starting here.
This prevents the fake event used here from being passed to the callback. This was causing issues where event handlers received an extra argument in dev only.
@gaearon I verified this fix resolves the issue by building and testing in the basic click counter example. I'm not sure where a unit test for this would go.