Fix issues with default object params in async functions (#96)
This change allows async functions to have a spread argument which defines a default value.
This commit is contained in:
committed by
Henry Zhu
parent
4506822180
commit
2cfae60b15
@@ -335,7 +335,7 @@ pp.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
|
||||
innerParenStart = this.state.start;
|
||||
}
|
||||
|
||||
elts.push(this.parseExprListItem());
|
||||
elts.push(this.parseExprListItem(undefined, possibleAsyncArrow ? { start: 0 } : undefined));
|
||||
}
|
||||
|
||||
// we found an async arrow function so let's not allow any inner parens
|
||||
|
||||
Reference in New Issue
Block a user