We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent effb913 commit 6d56705Copy full SHA for 6d56705
src/isStatelessComponent.js
@@ -22,7 +22,7 @@ function isReturningJSXElement(path) {
22
} else if (argument.node.type === 'CallExpression') {
23
24
const { node } = argument.get('callee');
25
- if (node.object.name === 'React' && node.property.name === 'createElement') {
+ if (node.name === 'createElement' || node.object.name === 'React' && node.property.name === 'createElement') {
26
visited = true;
27
}
28
0 commit comments