Skip to content

Commit

Permalink
fix: object-rest-spread should not transform array rest (#11282)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Mar 19, 2020
1 parent 375847b commit d60802b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -329,7 +329,7 @@ export default declare((api, opts) => {

const hasRest = declaration
.get("declarations")
.some(path => hasRestElement(path.get("id")));
.some(path => hasObjectPatternRestElement(path.get("id")));
if (!hasRest) return;

const specifiers = [];
Expand Down
Expand Up @@ -2,4 +2,4 @@
export var { b, ...c } = asdf2;
// Skip
export var { bb, cc } = ads;
export var [ dd, ee ] = ads;
export var [ dd, ee, ...ff ] = ads;
Expand Up @@ -9,4 +9,4 @@ export var {
bb,
cc
} = ads;
export var [dd, ee] = ads;
export var [dd, ee, ...ff] = ads;

0 comments on commit d60802b

Please sign in to comment.