Skip to content

Commit

Permalink
fix: add inList setter for compatibility with babel-minify (#10656)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Nov 5, 2019
1 parent f544753 commit 0f94999
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/babel-traverse/src/path/index.js
Expand Up @@ -161,6 +161,13 @@ export default class NodePath {
return !!this.listKey;
}

set inList(inList) {
if (!inList) {
this.listKey = null;
}
// ignore inList = true as it should depend on `listKey`
}

get parentKey() {
return this.listKey || this.key;
}
Expand Down

0 comments on commit 0f94999

Please sign in to comment.