Closed Brooooooklyn closed 6 years ago
@mitsuhiko
The line and column are zero indexed on lookup. Presumably you are passing wrong data.
that's wired, because the same file is decoded correctly by https://www.npmjs.com/package/source-map
@Brooooooklyn not sure what you mean. this library intentionally uses zero indexed values so you are passing the wrong values into the lookup functions.
To clarify that: if you want to look up line 1 and column 1 you need to pass (0, 0)
and not (1, 1)
.
Oh, I get it , sorry for my misunderstanding.
you can find a playground project in https://github.com/Brooooooklyn/sourcemap-issue
and
yarn && yarn start
to see the follow result:and the result from https://www.npmjs.com/package/source-map: