From 07f5f5937b61f9ed93300f7400103ba31b7b5bea Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 7 Apr 2015 16:56:19 +0200 Subject: [PATCH 1/2] Very basic fix for #36. --- source-map-support.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source-map-support.js b/source-map-support.js index 07048d8..2db0047 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -110,6 +110,10 @@ function retrieveSourceMap(source) { } function mapSourcePosition(position) { + if (!isInBrowser() && position.line === 1) { + position.column -= 62 + } + var sourceMap = sourceMapCache[position.source]; if (!sourceMap) { // Call the (overrideable) retrieveSourceMap function to get the source map. From 6056457014013092429a1c2e9f19940affb6b569 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Fri, 15 May 2015 10:54:22 +0200 Subject: [PATCH 2/2] Explainatory comment. --- source-map-support.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source-map-support.js b/source-map-support.js index 2db0047..6e59e74 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -110,6 +110,8 @@ function retrieveSourceMap(source) { } function mapSourcePosition(position) { + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 if (!isInBrowser() && position.line === 1) { position.column -= 62 }