mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Apply modifications by @jwalton
This commit is contained in:
@@ -210,15 +210,8 @@ patchStackTrace = ->
|
||||
|
||||
getSourceMapping = (filename, line, column) ->
|
||||
sourceMap = mainModule._sourceMaps[filename]
|
||||
answer = sourceMap.getSourcePosition [line - 1, column] if sourceMap
|
||||
if answer
|
||||
answer[0] += 1
|
||||
# # un-comment to dirty patch the column number, not very accurate
|
||||
# if answer[1] > 3
|
||||
# answer[1] -= 3
|
||||
# else
|
||||
# answer[1] = 0
|
||||
answer
|
||||
answer = sourceMap.getSourcePosition [line-1, column-1] if sourceMap
|
||||
if answer then [answer[0]+1, answer[1]+1] else null
|
||||
|
||||
frames = for frame in stack
|
||||
break if frame.getFunction() is exports.run
|
||||
|
||||
Reference in New Issue
Block a user