Skip to content

Commit 5b6616d

Browse files
author
Andrew Bradley
committed
Fixes #298
1 parent bf25b38 commit 5b6616d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/source-map-consumer.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,11 @@ SourceMapConsumer.prototype.eachMapping =
144144

145145
var sourceRoot = this.sourceRoot;
146146
mappings.map(function (mapping) {
147-
var source = mapping.source === null ? null : this._sources.at(mapping.source);
148-
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
147+
var source = null;
148+
if(mapping.source !== null) {
149+
source = this._sources.at(mapping.source);
150+
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
151+
}
149152
return {
150153
source: source,
151154
generatedLine: mapping.generatedLine,

0 commit comments

Comments
 (0)