fix: add optional: false to chained optional call expression (#11814)
This commit is contained in:
parent
f32d5debda
commit
02c8fd92bd
@ -660,8 +660,10 @@ export default class ExpressionParser extends LValParser {
|
||||
let node = this.startNodeAt(startPos, startLoc);
|
||||
node.callee = base;
|
||||
|
||||
if (state.optionalChainMember) {
|
||||
node.optional = optional;
|
||||
}
|
||||
if (optional) {
|
||||
node.optional = true;
|
||||
node.arguments = this.parseCallExpressionArguments(tt.parenR, false);
|
||||
} else {
|
||||
node.arguments = this.parseCallExpressionArguments(
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
"computed": false,
|
||||
"optional": true
|
||||
},
|
||||
"optional": false,
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,6 +257,7 @@
|
||||
"computed": false,
|
||||
"optional": false
|
||||
},
|
||||
"optional": false,
|
||||
"arguments": [
|
||||
{
|
||||
"type": "NumericLiteral",
|
||||
@ -303,6 +304,7 @@
|
||||
"computed": false,
|
||||
"optional": false
|
||||
},
|
||||
"optional": false,
|
||||
"arguments": []
|
||||
}
|
||||
]
|
||||
|
||||
@ -93,6 +93,7 @@
|
||||
"computed": false,
|
||||
"optional": true
|
||||
},
|
||||
"optional": false,
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,6 +99,7 @@
|
||||
"computed": false,
|
||||
"optional": false
|
||||
},
|
||||
"optional": false,
|
||||
"arguments": [
|
||||
{
|
||||
"type": "NumericLiteral",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user