diff --git a/src/babel/transformation/transformers/es6/block-scoping.js b/src/babel/transformation/transformers/es6/block-scoping.js index 391c7dccaa..4c2bea586a 100644 --- a/src/babel/transformation/transformers/es6/block-scoping.js +++ b/src/babel/transformation/transformers/es6/block-scoping.js @@ -139,7 +139,12 @@ var hoistVarDeclarationsVisitor = { enter(node, parent, scope, self) { if (this.isForStatement()) { if (isVar(node.init, node)) { - node.init = t.sequenceExpression(self.pushDeclar(node.init)); + var nodes = self.pushDeclar(node.init); + if (nodes.length === 1) { + node.init = nodes[0]; + } else { + node.init = t.sequenceExpression(nodes); + } } } else if (this.isFor()) { if (isVar(node.left, node)) {