From 17c8e639cc504eb1c2bcf527354c7de47c524c74 Mon Sep 17 00:00:00 2001 From: Dmitriy Lazarev Date: Mon, 27 Jul 2020 16:54:25 +0500 Subject: [PATCH] [Fix]: TypeError on getting name of anonymous function --- lib/util/Components.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util/Components.js b/lib/util/Components.js index deb26dda56..9eb0f78282 100644 --- a/lib/util/Components.js +++ b/lib/util/Components.js @@ -689,6 +689,7 @@ function componentRule(rule, context) { getStatelessComponent(node) { if ( node.type === 'FunctionDeclaration' + && node.id && isFirstLetterCapitalized(node.id.name) && utils.isReturningJSXOrNull(node) ) {