Skip to content

Commit 5a41bed

Browse files
committed
Fix crash in component detection class (fixes jsx-eslint#364)
1 parent abfb98b commit 5a41bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/Components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function componentRule(rule, context) {
286286
break;
287287
}
288288
}
289-
if (!defInScope) {
289+
if (!defInScope || !defInScope.node) {
290290
return null;
291291
}
292292
node = defInScope.node.init || defInScope.node;

0 commit comments

Comments
 (0)