fix: add inList setter for compatibility with babel-minify (#10656)

This commit is contained in:
Huáng Jùnliàng 2019-11-05 12:28:16 -05:00 committed by GitHub
parent f544753bb8
commit 0f949990c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,13 @@ export default class NodePath {
return !!this.listKey; return !!this.listKey;
} }
set inList(inList) {
if (!inList) {
this.listKey = null;
}
// ignore inList = true as it should depend on `listKey`
}
get parentKey() { get parentKey() {
return this.listKey || this.key; return this.listKey || this.key;
} }