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

[style-prop-object] False error: Style prop value must be an object #820

Closed
tleunen opened this issue Sep 12, 2016 · 0 comments
Closed

[style-prop-object] False error: Style prop value must be an object #820

tleunen opened this issue Sep 12, 2016 · 0 comments
Labels

Comments

@tleunen
Copy link

tleunen commented Sep 12, 2016

The rule is throwing in my code with this example:

React.createElement(MyCustomElem, {
    [style]: true
}, `My custom Elem`)

if I rename the variable style with something else, everything is fine.

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
    at /Users/tommy.leunen/dev/pppp/node_modules/eslint-plugin-react/lib/rules/style-prop-object.js:51:34
    at Array.find (native)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants