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 cc2bdf9 commit 62f3aedCopy full SHA for 62f3aed
lib/rules/display-name.js
@@ -65,8 +65,7 @@ module.exports = {
65
* @returns {Boolean} True if React.forwardRef is nested inside React.memo, false if not.
66
*/
67
function isNestedMemo(node) {
68
- const argumentIsCallExpression = node.arguments && node.arguments[0]
69
- ? node.arguments[0].type === 'CallExpression' : false;
+ const argumentIsCallExpression = node.arguments && node.arguments[0] && node.arguments[0].type === 'CallExpression';
70
71
return node.type === 'CallExpression'
72
&& argumentIsCallExpression
0 commit comments