Skip to content

Don't use key when defined on String, Number prototypes #5536

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

Merged
merged 1 commit into from
Dec 1, 2015

Conversation

zpao
Copy link
Member

@zpao zpao commented Nov 23, 2015

hasOwnProperty might be the real check we want here but the typeof check fixed the case we cared about (basically just strings and numbers, everything else looks for key)

Fixes #2612

@zpao
Copy link
Member Author

zpao commented Nov 28, 2015

@spicyj do I get a prize for (attempting to) fix an old issue? Maybe not as old as yours but still…

@sophiebits
Copy link
Collaborator

Sure, back at 'cha. 🎁

zpao added a commit that referenced this pull request Dec 1, 2015
Don't use `key` when defined on String, Number prototypes
@zpao zpao merged commit 13c398b into facebook:master Dec 1, 2015
@zpao zpao deleted the keys-on-prototypes branch February 8, 2016 22:04
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.

Unexpected string key handling
3 participants