fixed missing errors on assignment pattern in object expression (#10607)
* 🐛 fixed missing errors on assignment pattern in object expression * ♻️ remove a non-needed comment * 🐛 missed adding comma in the test input * 🐛 fixed the failing valid-property-initializer test
This commit is contained in:
committed by
Nicolò Ribaudo
parent
198b4a0fbd
commit
4b3a19ea9f
@@ -204,7 +204,10 @@ export default class ExpressionParser extends LValParser {
|
||||
node.left = this.match(tt.eq)
|
||||
? this.toAssignable(left, undefined, "assignment expression")
|
||||
: left;
|
||||
refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
|
||||
|
||||
if (refShorthandDefaultPos.start >= node.left.start) {
|
||||
refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
|
||||
}
|
||||
|
||||
this.checkLVal(left, undefined, undefined, "assignment expression");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user