Skip to content

Commit 0f94999

Browse files
authored
fix: add inList setter for compatibility with babel-minify (#10656)
1 parent f544753 commit 0f94999

File tree

1 file changed

+7
-0
lines changed
  • packages/babel-traverse/src/path

1 file changed

+7
-0
lines changed

packages/babel-traverse/src/path/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ export default class NodePath {
161161
return !!this.listKey;
162162
}
163163

164+
set inList(inList) {
165+
if (!inList) {
166+
this.listKey = null;
167+
}
168+
// ignore inList = true as it should depend on `listKey`
169+
}
170+
164171
get parentKey() {
165172
return this.listKey || this.key;
166173
}

0 commit comments

Comments
 (0)