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

Added warning when calling methods on a released event. #4635

Merged
merged 1 commit into from
Aug 31, 2015

Conversation

edvinerikson
Copy link
Contributor

Fixes #4514
Warns only if __DEV__ is set.
Not quite sure that I got the smoothest message in there, would appreciate some feedback (on both the message and the code).

Changed behavior:
It exits the method if nativeEvent is falsy.

We should probably create a short-link to the docs.
cc @jimfb

@nmn
Copy link
Contributor

nmn commented Aug 30, 2015

I think this code will result in a warning in all instances where preventDefault is used. I think the warning should only be logged if !event.

@edvinerikson
Copy link
Contributor Author

If I have understood the behavior of the warning package, it should be correct as it is now.

@nmn
Copy link
Contributor

nmn commented Aug 30, 2015

Sorry I missed that. Yes it should work correctly. +1

@slorber
Copy link
Contributor

slorber commented Aug 31, 2015

this seems nice to me

@jimfb
Copy link
Contributor

jimfb commented Aug 31, 2015

Looks good, thanks!

jimfb added a commit that referenced this pull request Aug 31, 2015
Added warning when calling methods on a released event.
@jimfb jimfb merged commit 0ff65cc into facebook:master Aug 31, 2015
sophiebits added a commit that referenced this pull request Aug 31, 2015
Fix code style/grammar on synthetic event warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants