Fix an ordering bug in object-rest-spread.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user