public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf30dc3
)
Handle the case when SourceMapConsumer.originalPositionFor returns null source.
author
Arnavion
<arnavion@gmail.com>
Mon, 3 Mar 2014 03:20:19 +0000
(19:20 -0800)
committer
Arnavion
<arnavion@gmail.com>
Mon, 3 Mar 2014 03:20:19 +0000
(19:20 -0800)
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
lib/sourcemap.js
patch
|
blob
|
history
package.json
patch
|
blob
|
history
diff --git
a/lib/sourcemap.js
b/lib/sourcemap.js
index
8e86ebd
..
663ef12
100644
(file)
--- 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;
diff --git
a/package.json
b/package.json
index
fb1f7e6
..
b9747ad
100644
(file)
--- a/
package.json
+++ b/
package.json
@@
-16,7
+16,7
@@
},
"dependencies": {
"async" : "~0.2.6",
- "source-map" : "~0.1.3
1
",
+ "source-map" : "~0.1.3
3
",
"optimist" : "~0.3.5",
"uglify-to-browserify": "~1.0.0"
},