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
PropTypes.oneOf relies upon stringification when using Symbols #10
Comments
Hi, is there any chance that this can be fixed quickly? I still experience this error when passing a
which can be fixed easily by
STACKTRACE:
|
Using JSON is a bad idea because symbols stringify to null. Wrapping propValue in |
OK, looks like this depends on the environment running on, I just tried on Node.js 8.x during unit tests where I got
when I provide Of course, this should work out for the other environments:
Anyway, hope this gets fixed soon 😃 |
- Fixes error due to an attempt to coerce a Symbol to a string - Improves formatting of the "expected" portion of the generated warning, outputting for example `["Symbol(A)","Symbol(B)"]` rather than `[null,null]` Fixes facebook#10
- Fixes error due to an attempt to coerce a Symbol to a string - Improves formatting of the "expected" portion of the generated warning, outputting for example `["Symbol(A)","Symbol(B)"]` rather than `[null,null]` Fixes facebook#10
Original issue: facebook/react#9181
The text was updated successfully, but these errors were encountered: