From cfe9a4e2708f847ec1e6cd40670c44faf86fdcdb Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 26 Jan 2015 17:43:19 +1100 Subject: [PATCH] add isConsequenceExpressionStatement last --- lib/6to5/transformation/transformers/es6/destructuring.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/6to5/transformation/transformers/es6/destructuring.js b/lib/6to5/transformation/transformers/es6/destructuring.js index 5e3f97ca17..bf94da2cca 100644 --- a/lib/6to5/transformation/transformers/es6/destructuring.js +++ b/lib/6to5/transformation/transformers/es6/destructuring.js @@ -236,9 +236,8 @@ exports.CatchClause = function (node, parent, scope, context, file) { exports.ExpressionStatement = function (node, parent, scope, context, file) { var expr = node.expression; if (expr.type !== "AssignmentExpression") return; - if (file.isConsequenceExpressionStatement(node)) return; - if (!t.isPattern(expr.left)) return; + if (file.isConsequenceExpressionStatement(node)) return; var nodes = [];