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 ab9b2a9 commit 7928c33Copy full SHA for 7928c33
src/isStatelessComponent.js
@@ -21,13 +21,12 @@ function isReturningJSXElement(path) {
21
visited = true;
22
} else if (argument.node.type === 'CallExpression') {
23
24
- const node = argument.get('callee').node;
+ const { node } = argument.get('callee');
25
if (node.object.name === 'React' && node.property.name === 'createElement') {
26
27
}
28
29
- const name = argument.get('callee').node.name;
30
- const binding = path.scope.getBinding(name);
+ const binding = path.scope.getBinding(node.name);
31
32
if (!binding) {
33
return;
0 commit comments