Skip to content

Commit 7c004d3

Browse files
committed
Fix jsx-no-undef with babel-eslint (fixes #30)
1 parent 7e510e5 commit 7c004d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rules/jsx-no-undef.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ module.exports = function(context) {
3838
}
3939
if (scope.childScopes.length) {
4040
variables = scope.childScopes[0].variables.concat(variables);
41+
// Temporary fix for babel-eslint
42+
if (scope.childScopes[0].childScopes.length) {
43+
variables = scope.childScopes[0].childScopes[0].variables.concat(variables);
44+
}
4145
}
4246

4347
for (i = 0, len = variables.length; i < len; i++) {

0 commit comments

Comments
 (0)