diff --git a/src/parse/read/context.ts b/src/parse/read/context.ts index 77fd2cbf6891..13d1e9ece1b1 100644 --- a/src/parse/read/context.ts +++ b/src/parse/read/context.ts @@ -57,6 +57,7 @@ export default function readContext(parser: Parser) { errorOnAssignmentPattern(parser); parser.eat(']', true); + context.end = parser.index; } else if (parser.eat('{')) { @@ -95,6 +96,7 @@ export default function readContext(parser: Parser) { errorOnAssignmentPattern(parser); parser.eat('}', true); + context.end = parser.index; } else {