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

Fix ReactNodeFormatter #3143

Merged
merged 1 commit into from
Jan 7, 2019
Merged

Fix ReactNodeFormatter #3143

merged 1 commit into from
Jan 7, 2019

Conversation

juangl
Copy link
Contributor

@juangl juangl commented Jan 7, 2019

Why

ReactNodeFormatter makes the app crash when attempting to format a "null object" (created with Object.create(null)).

How

Checking that value actually inherences Object before calling hasOwnProperty. An alternative solution is calling hasOwnProperty as Object.prototype.hasOwnProperty.call(value, key).

Test Plan

console.log a null object. Before this change the app crashes and after it the app should work and should format react nodes property as it used to.

@sjchmiela sjchmiela requested a review from ide January 7, 2019 11:00
@ide ide merged commit 85ae74f into expo:master Jan 7, 2019
sjchmiela added a commit that referenced this pull request Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants