aboutsummaryrefslogtreecommitdiff
path: root/lib/sourcemap.js
diff options
context:
space:
mode:
authorArnavion <arnavion@gmail.com>2014-03-02 19:20:19 -0800
committerArnavion <arnavion@gmail.com>2014-03-02 19:20:19 -0800
commit014f655c5f9f0a32994ee556e40acbe8349943fe (patch)
tree33b7f4bf07d7352c838064ba3f5452667fc73f61 /lib/sourcemap.js
parentbf30dc30383520015bd265e528325c64e5ebe4ce (diff)
downloadtracifyjs-014f655c5f9f0a32994ee556e40acbe8349943fe.tar.gz
tracifyjs-014f655c5f9f0a32994ee556e40acbe8349943fe.zip
Handle the case when SourceMapConsumer.originalPositionFor returns null source.
This happens when SourceMapConsumer does not have a valid position to map the input line and column. This is a change in mozilla/source-map starting from version 0.1.33 Fixes #436
Diffstat (limited to 'lib/sourcemap.js')
-rw-r--r--lib/sourcemap.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sourcemap.js b/lib/sourcemap.js
index 8e86ebd8..663ef12e 100644
--- a/lib/sourcemap.js
+++ b/lib/sourcemap.js
@@ -64,6 +64,9 @@ function SourceMap(options) {
line: orig_line,
column: orig_col
});
+ if (info.source === null) {
+ return;
+ }
source = info.source;
orig_line = info.line;
orig_col = info.column;