fix block scoped tracking in functions - fixes #710
This commit is contained in:
parent
c1ba55a52d
commit
24e70802b5
@ -320,11 +320,12 @@ Scope.prototype.crawl = function () {
|
|||||||
for (i = 0; i < block.params.length; i++) {
|
for (i = 0; i < block.params.length; i++) {
|
||||||
this.register(block.params[i]);
|
this.register(block.params[i]);
|
||||||
}
|
}
|
||||||
|
this.traverse(block.body, blockVariableVisitor, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Program, BlockStatement, Function - let variables
|
// Program, BlockStatement, Function - let variables
|
||||||
|
|
||||||
if (t.isBlockStatement(block) || t.isProgram(block) || t.isFunction(block)) {
|
if (t.isBlockStatement(block) || t.isProgram(block)) {
|
||||||
this.traverse(block, blockVariableVisitor, this);
|
this.traverse(block, blockVariableVisitor, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user