Skip to content

Commit

Permalink
apply to forin, forof
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlmint committed Apr 28, 2017
1 parent 7c22438 commit bdf21eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
scope.directives = save_scope.directives;
}
// issue 1753 - name mangling in for loop scope should consider parent scope
if (node instanceof AST_For) {
if (node instanceof AST_For
|| node instanceof AST_ForIn
|| node instanceof AST_ForOf) {
save_scope.variables.each(function(def) {
push_uniq(scope.enclosed, def);
});
Expand Down

0 comments on commit bdf21eb

Please sign in to comment.