fix(node-swc): Handle empty object patterns. (#1393)

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
This commit is contained in:
Jovi De Croock 2021-02-14 11:57:15 +01:00 committed by GitHub
parent 313f51fab1
commit f5a90ae985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1656,7 +1656,7 @@ export default class Visitor {
}
visitObjectPattern(n: ObjectPattern): Pattern {
n.props = this.visitObjectPatternProperties(n.props);
n.props = this.visitObjectPatternProperties(n.props || []);
n.typeAnnotation = this.visitTsTypeAnnotation(n.typeAnnotation);
return n;
}