Fix crash when exporting with destructuring and sparse array (#170)
* Create reproducible crash when exporting with destructuring and sparse array * Fix crash when exporting with destructuring and sparse array
This commit is contained in:
@@ -943,7 +943,9 @@ pp.checkDeclaration = function(node) {
|
||||
}
|
||||
} else if (node.type === "ArrayPattern") {
|
||||
for (let elem of node.elements) {
|
||||
this.checkDeclaration(elem);
|
||||
if (elem) {
|
||||
this.checkDeclaration(elem);
|
||||
}
|
||||
}
|
||||
} else if (node.type === "ObjectProperty") {
|
||||
this.checkDeclaration(node.value);
|
||||
|
||||
Reference in New Issue
Block a user