Unverified Commit 714b1944 authored by Liana Husikyan's avatar Liana Husikyan Committed by GitHub

checking of the type of id

parent 9232cccc
...@@ -16,6 +16,8 @@ offsetToColumnConverter.prototype.offsetToLineColumn = function (rawLocation, fi ...@@ -16,6 +16,8 @@ offsetToColumnConverter.prototype.offsetToLineColumn = function (rawLocation, fi
if (!this.lineBreakPositionsByContent[file]) { if (!this.lineBreakPositionsByContent[file]) {
for (var filename in asts) { for (var filename in asts) {
var source = asts[filename] 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) { if (source.id === file) {
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content) this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content)
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment