inline-source-map
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -111,3 +111,9 @@ 'use strict'; | ||
var toSourcesContent = (function (s) { return this.sourcesContent[s] || null; }).bind(this); | ||
var toSourcesContent = (function (s) { | ||
if (typeof this.sourcesContent[s] === 'string') { | ||
return this.sourcesContent[s]; | ||
} else { | ||
return null; | ||
} | ||
}).bind(this); | ||
map.sourcesContent = map.sources.map(toSourcesContent); | ||
@@ -114,0 +120,0 @@ return map; |
{ | ||
"name": "inline-source-map", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -135,2 +135,10 @@ 'use strict'; | ||
}) | ||
t.test('one file with empty source', function (t) { | ||
var gen = generator() | ||
.addGeneratedMappings('empty.js', '') | ||
.addSourceContent('empty.js', '') | ||
t.deepEqual(gen.toJSON()["sourcesContent"], [""]) | ||
t.end() | ||
}); | ||
}) |
27008
570