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 fe3ac1f commit e25a88cCopy full SHA for e25a88c
lib/util/Components.js
@@ -401,8 +401,8 @@ function componentRule(rule, context) {
401
}
402
const propertyNames = ['forwardRef', 'memo'];
403
const calleeObject = node.callee.object;
404
- if (calleeObject) {
405
- return arrayIncludes(propertyNames, calleeObject.name) && calleeObject.name === pragma;
+ if (calleeObject && node.callee.property) {
+ return arrayIncludes(propertyNames, node.callee.property.name) && calleeObject.name === pragma;
406
407
return arrayIncludes(propertyNames, node.callee.name) && this.isDestructuredFromPragmaImport(node.callee.name);
408
},
0 commit comments