From e966d6fd67bb6e90489aa3bcc6ef8b3cefc96e18 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 29 Aug 2019 09:56:42 +0200 Subject: [PATCH] checking of the type of id --- remix-lib/src/offsetToLineColumnConverter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/remix-lib/src/offsetToLineColumnConverter.js b/remix-lib/src/offsetToLineColumnConverter.js index 44d0458a09..b69731b3b6 100644 --- a/remix-lib/src/offsetToLineColumnConverter.js +++ b/remix-lib/src/offsetToLineColumnConverter.js @@ -16,6 +16,8 @@ offsetToColumnConverter.prototype.offsetToLineColumn = function (rawLocation, fi if (!this.lineBreakPositionsByContent[file]) { for (var filename in asts) { var source = asts[filename] + // source id was string before. in newer versions it has been changed to an integer so we need to check the type here + if (typeof source.id === 'string') source.id = parseInt(source.id, 10) if (source.id === file) { this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content) break