Skip to content

Commit

Permalink
Merge pull request #138 from Yogu/fix-out-of-range-columns
Browse files Browse the repository at this point in the history
Defensive coding to prevent out-of-range column
  • Loading branch information
LinusU committed Aug 17, 2017
2 parents 6020c02 + 58a1169 commit 9addc16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source-map-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,9 @@ function wrapCallSite(frame) {

// Fix position in Node where some (internal) code is prepended.
// See https://github.com/evanw/node-source-map-support/issues/36
if (line === 1 && !isInBrowser() && !frame.isEval()) {
column -= 62;
var headerLength = 62;
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
column -= headerLength;
}

var position = mapSourcePosition({
Expand Down

0 comments on commit 9addc16

Please sign in to comment.