Skip to content

Commit

Permalink
fix: false positive on createElement
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Oct 8, 2019
1 parent 9986591 commit 2a659df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/features/css-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ export default {
const propsPath = path.get('arguments')[1];

const innerState = { pluginOptions, file, processed: false, typeName };
propsPath.traverse(cssPropertyVisitors, innerState);

// We aren't checking very hard that this is a React createElement call
if (propsPath) {
propsPath.traverse(cssPropertyVisitors, innerState);
}

if (innerState.processed) {
const { jsx } = state[JSX_IDENTS];
Expand Down

0 comments on commit 2a659df

Please sign in to comment.