Skip to content

Commit

Permalink
Merge pull request #4511 from motiz88/fix-4462
Browse files Browse the repository at this point in the history
Fix UpdateExpression handling in es2015-modules-commonjs, resolve #4462
  • Loading branch information
loganfsmyth committed Sep 25, 2016
2 parents c2ed9de + 43e0cfb commit 819cde9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
Expand Up @@ -119,8 +119,7 @@ export default function () {
}
nodes.push(t.binaryExpression(operator, arg.node, t.numericLiteral(1)));

let newPaths = path.replaceWithMultiple(t.sequenceExpression(nodes));
for (const newPath of newPaths) this.requeueInParent(newPath);
path.replaceWithMultiple(t.sequenceExpression(nodes));
}
};

Expand Down
@@ -0,0 +1,4 @@
export { yy, zz };

var yy = 0;
var zz = yy++;
@@ -0,0 +1,11 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.yy = yy;
exports.zz = zz;


var yy = 0;
var zz = (exports.yy = yy += 1, yy - 1);
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}

0 comments on commit 819cde9

Please sign in to comment.