Skip to content

Commit fe3ac1f

Browse files
authored
[Fix] Read name of callee object.
In isPragmaComponentWrapper check name of callee object if awailable. Fixed jsx-eslint#2124
1 parent 5fc50aa commit fe3ac1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/Components.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ function componentRule(rule, context) {
402402
const propertyNames = ['forwardRef', 'memo'];
403403
const calleeObject = node.callee.object;
404404
if (calleeObject) {
405-
return arrayIncludes(propertyNames, node.callee.property.name) && node.callee.object.name === pragma;
405+
return arrayIncludes(propertyNames, calleeObject.name) && calleeObject.name === pragma;
406406
}
407407
return arrayIncludes(propertyNames, node.callee.name) && this.isDestructuredFromPragmaImport(node.callee.name);
408408
},

0 commit comments

Comments
 (0)