diff --git a/packages/babel-parser/src/parser/location.js b/packages/babel-parser/src/parser/location.js index e89c6f36ebbc..e330e85d0961 100644 --- a/packages/babel-parser/src/parser/location.js +++ b/packages/babel-parser/src/parser/location.js @@ -226,14 +226,7 @@ export default class LocationParser extends CommentsParser { errorTemplate.replace(/%(\d+)/g, (_, i: number) => params[i]) + ` (${loc.line}:${loc.column})`; return this._raise( - Object.assign( - {}, - { - loc, - pos, - }, - data, - ), + Object.assign(({ loc, pos }: Object), data), message, ); }