From 014f655c5f9f0a32994ee556e40acbe8349943fe Mon Sep 17 00:00:00 2001 From: Arnavion Date: Sun, 2 Mar 2014 19:20:19 -0800 Subject: [PATCH] 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 --- lib/sourcemap.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; diff --git a/package.json b/package.json index fb1f7e6a..b9747ade 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "async" : "~0.2.6", - "source-map" : "~0.1.31", + "source-map" : "~0.1.33", "optimist" : "~0.3.5", "uglify-to-browserify": "~1.0.0" }, -- 2.34.1