From e05aed03949a7a5ba2346e8cb8d132dc37e2d54b Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 15 Feb 2015 10:27:56 +1100 Subject: [PATCH] support all loops when adding declarations - #779 --- lib/6to5/traversal/scope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/traversal/scope.js b/lib/6to5/traversal/scope.js index 5b0d5d95c5..8304a4f1ac 100644 --- a/lib/6to5/traversal/scope.js +++ b/lib/6to5/traversal/scope.js @@ -526,7 +526,7 @@ Scope.prototype.crawl = function () { Scope.prototype.push = function (opts) { var block = this.block; - if (t.isFor(block) || t.isCatchClause(block) || t.isFunction(block)) { + if (t.isLoop(block) || t.isCatchClause(block) || t.isFunction(block)) { t.ensureBlock(block); block = block.body; }