From 88cb9a37b54c58fc79c7001c1408f64bf07245e5 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sun, 30 Jan 2022 14:17:21 -0800 Subject: [PATCH] Make index a normal property of Position instead of a non-enumerable property. Reviewed by @tolmasky. --- packages/babel-parser/src/util/location.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/babel-parser/src/util/location.js b/packages/babel-parser/src/util/location.js index 49ace09998d0..109a45c7e662 100644 --- a/packages/babel-parser/src/util/location.js +++ b/packages/babel-parser/src/util/location.js @@ -15,9 +15,7 @@ export class Position { constructor(line: number, col: number, index: number) { this.line = line; this.column = col; - - // this.index = index; - Object.defineProperty(this, "index", { enumerable: false, value: index }); + this.index = index; } }