fix forOf scope declarations not propagating to new for loop - fixes #538

This commit is contained in:
Sebastian McKenzie 2015-01-20 19:33:05 +11:00
parent e46f42872a
commit 4b525daf72

View File

@ -30,6 +30,9 @@ exports.ForOfStatement = function (node, parent, scope, context, file) {
// push the rest of the original loop body onto our new body // push the rest of the original loop body onto our new body
block.body = block.body.concat(node.body.body); block.body = block.body.concat(node.body.body);
// todo: find out why this is necessary? #538
loop._scopeInfo = node._scopeInfo;
return loop; return loop;
}; };