From 810c97d7abcce73f57d1bcb940e55f82eb47a9d4 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 18 Jan 2015 18:24:16 +1100 Subject: [PATCH] actually make destructuring use the provided operator --- lib/6to5/transformation/transformers/es6-destructuring.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/transformation/transformers/es6-destructuring.js b/lib/6to5/transformation/transformers/es6-destructuring.js index 8b1f5ae882..910eed82a8 100644 --- a/lib/6to5/transformation/transformers/es6-destructuring.js +++ b/lib/6to5/transformation/transformers/es6-destructuring.js @@ -7,7 +7,7 @@ var buildVariableAssign = function (opts, id, init) { if (t.isMemberExpression(id)) op = "="; if (op) { - return t.expressionStatement(t.assignmentExpression("=", id, init)); + return t.expressionStatement(t.assignmentExpression(op, id, init)); } else { return t.variableDeclaration(opts.kind, [ t.variableDeclarator(id, init)