|
|
@ -37,7 +37,6 @@ export class OffsetToLineColumnConverter extends Plugin { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
offsetToLineColumnWithContent (rawLocation, file, sources, content) { |
|
|
|
offsetToLineColumnWithContent (rawLocation, file, sources, content) { |
|
|
|
if (!this.lineBreakPositionsByContent[file]) { |
|
|
|
|
|
|
|
const sourcesArray = Object.keys(sources) |
|
|
|
const sourcesArray = Object.keys(sources) |
|
|
|
if (content === '' || (file === 0 && sourcesArray.length === 1)) { |
|
|
|
if (content === '' || (file === 0 && sourcesArray.length === 1)) { |
|
|
|
// if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12)
|
|
|
|
// if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12)
|
|
|
@ -45,7 +44,6 @@ export class OffsetToLineColumnConverter extends Plugin { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(content) |
|
|
|
this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(content) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) |
|
|
|
return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|