Skip to content

Commit 924a52e

Browse files
committed
Merge pull request #47 from julien-f/patch-1
Fix positioning in Node (fix #36).
2 parents e1a092f + 6056457 commit 924a52e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source-map-support.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ function retrieveSourceMap(source) {
110110
}
111111

112112
function mapSourcePosition(position) {
113+
// Fix position in Node where some (internal) code is prepended.
114+
// See https://github.com/evanw/node-source-map-support/issues/36
115+
if (!isInBrowser() && position.line === 1) {
116+
position.column -= 62
117+
}
118+
113119
var sourceMap = sourceMapCache[position.source];
114120
if (!sourceMap) {
115121
// Call the (overrideable) retrieveSourceMap function to get the source map.

0 commit comments

Comments
 (0)