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

Invalid argument supplied to oneOf, expected an instance of array. #375

Closed
Johnsel opened this issue Aug 5, 2016 · 2 comments
Closed

Invalid argument supplied to oneOf, expected an instance of array. #375

Johnsel opened this issue Aug 5, 2016 · 2 comments
Labels

Comments

@Johnsel
Copy link
Contributor

Johnsel commented Aug 5, 2016

I have this code:
<Menu.Item label={<FormattedMessage {...linksMessages.inspections} />} href="/inspections" />

The label works, but the console shows an error:
warning.js?8a56:44 Warning: Invalid argument supplied to oneOf, expected an instance of array. warning @ warning.js?8a56:44 createEnumTypeChecker @ ReactPropTypes.js?3c83:214 (anonymous function) @ Label.js?9d70:181

Where Label.js:70:181 equals

/** Size of the label. */ size: _react.PropTypes.oneOf(Label._meta.props.sizes),

Label._meta = { ..., props: { ... size: sui.sizes, ....

var _semanticUtils = require('../../utils/semanticUtils');

var sui = _interopRequireWildcard(_semanticUtils);

Any clues as to why this doesn't resolve properly?

@Johnsel
Copy link
Contributor Author

Johnsel commented Aug 5, 2016

Tested with a plain string value for "label" just now, same behavior

@levithomason
Copy link
Member

yep, the propType arg points to _meta.props.sizes instead of _meta.props.size. I fixed this here in the PR to support React 15.3.0 (#374) but hadn't made a release yet.

Released just now in v0.28.1, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants