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 string casting and remove Flow suppression comments #9087

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

acdlite
Copy link
Contributor

@acdlite acdlite commented Mar 1, 2017

@@ -136,9 +134,9 @@ function throwOnInvalidObjectType(returnFiber : Fiber, newChild : Object) {
invariant(
false,
'Objects are not valid as a React child (found: %s).%s',
childrenString === '[object Object]' ?
newChild.toString() === '[object Object]' ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that we do this here but nowhere else.

If this is Object.create(null) this will throw so probably can't do this. Could do Object.prototype.toString.call(newChild).

@acdlite acdlite force-pushed the fixstringcasting branch from 3721cd9 to 7bc1c8d Compare March 1, 2017 19:32
@acdlite acdlite force-pushed the fixstringcasting branch from 7bc1c8d to 5e5bc69 Compare March 1, 2017 21:07
@acdlite acdlite merged commit 5881371 into facebook:master Mar 1, 2017
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.

3 participants