Merge pull request #1273 from ethereum/LianaHus-patch-2

checking of the type of id
pull/7/head
yann300 5 years ago committed by GitHub
commit 30633c2377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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

Loading…
Cancel
Save