Only special-case for..on/of declaration hoisting - fixes #1929

This commit is contained in:
Logan Smyth
2015-07-06 20:52:58 -07:00
parent 337c51df5c
commit b518394a3f
3 changed files with 6 additions and 3 deletions

View File

@@ -33,8 +33,7 @@ var hoistVariablesVisitor = {
}
// for (var i in test)
// for (var i = 0;;)
if (t.isFor(parent) && (parent.left === node || parent.init === node)) {
if (t.isFor(parent) && parent.left === node) {
return node.declarations[0].id;
}