Fix: Allow identifier async for default param in arrow expression (#165)
fixes #118
This commit is contained in:
committed by
Daniel Tschinder
parent
7dd45f7465
commit
4fc0a3839e
@@ -750,7 +750,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
|
||||
if (isGenerator) this.unexpected();
|
||||
|
||||
let asyncId = this.parseIdentifier();
|
||||
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) {
|
||||
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR) || this.match(tt.eq)) {
|
||||
prop.key = asyncId;
|
||||
} else {
|
||||
isAsync = true;
|
||||
|
||||
Reference in New Issue
Block a user