Catch undefined

This commit is contained in:
Sashko Stubailo
2015-01-13 14:33:36 -08:00
committed by Sashko Stubailo
parent b08b8e219a
commit aa8d701f76

View File

@@ -325,6 +325,11 @@ var compileUnibuild = function (options) {
};
var convertSourceMapPaths = function (sourcemap, f) {
if (! sourcemap) {
// Don't try to convert it if it doesn't exist
return sourcemap;
}
var srcmap = JSON.parse(sourcemap);
srcmap.sources = _.map(srcmap.sources, f);
return JSON.stringify(srcmap);