Fix an ordering bug in object-rest-spread.

This commit is contained in:
Logan Smyth
2017-05-02 21:43:24 -07:00
committed by Brian Ng
parent 8e19a5b057
commit 18084db7cf

View File

@@ -129,7 +129,7 @@ export default function({ types: t }) {
// function a({ b, ...c }) {}
Function(path) {
const params = path.get("params");
for (let i = 0; i < params.length; i++) {
for (let i = params.length - 1; i >= 0; i--) {
replaceRestElement(params[i].parentPath, params[i], i, params.length);
}
},