From 67a12f03fa2e8ba67758f4ed66077dbd115c8b30 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sat, 28 Mar 2015 00:26:04 +1100 Subject: [PATCH] use replaceWithNodes rather than replace in es6.forOf transformer --- src/babel/transformation/transformers/es6/for-of.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babel/transformation/transformers/es6/for-of.js b/src/babel/transformation/transformers/es6/for-of.js index 9dab7bbb22..65f68500ec 100644 --- a/src/babel/transformation/transformers/es6/for-of.js +++ b/src/babel/transformation/transformers/es6/for-of.js @@ -33,7 +33,7 @@ export function ForOfStatement(node, parent, scope, file) { t.inherits(loop, node); - if (build.replaceParent) this.parentPath.replaceWith(build.node); + if (build.replaceParent) this.parentPath.replaceWithNodes(build.node); return build.node; }