-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
mergeInto show console warning about pure object #22308
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write |
I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while. If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here. |
Summary: `instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable. This PR is solution of #22308 issue. (Fixes #22308) Pull Request resolved: #22348 Differential Revision: D13334882 Pulled By: cpojer fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
Summary: `instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable. This PR is solution of #22308 issue. (Fixes #22308) Pull Request resolved: #22348 Differential Revision: D13334882 Pulled By: cpojer fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
Summary: `instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable. This PR is solution of #22308 issue. (Fixes #22308) Pull Request resolved: #22348 Differential Revision: D13334882 Pulled By: cpojer fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
Summary: `instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable. This PR is solution of facebook#22308 issue. (Fixes facebook#22308) Pull Request resolved: facebook#22348 Differential Revision: D13334882 Pulled By: cpojer fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
Environment
Run
react-native info
in your terminal and paste its contents here.Description
code in mergeInto has potential error about Object created by
Object.create(null)
. they does not have Object.prototype chain, sotwo.hasOwnProperty
shows following error.I'm facing this issue with react-native-extended-stylesheet and
FlatList
.FlatList
has two style property (style, contentContainerStyle). I think these two styles are merged into one bymergeInto
.Environment
[skip envinfo]. The code was written 4 years ago, so I think it's affected on all RN environments.
Reproducible Demo
Sorry, doesn't have demo.
Suggestions
two.hasOwnProperty(key)
should beObject.prototype.hasOwnProperty.call(two, key)
. this makes all thing works well. 😃The text was updated successfully, but these errors were encountered: