Make empty source map values more reasonable in .minify()
`"null"` isn't a very usable value. `JSON.parse(null)` also gives `null`, which makes this fully backwards compatible. Closes #616
This commit is contained in:
@@ -133,9 +133,14 @@ exports.minify = function(files, options) {
|
||||
stream += "\n//# sourceMappingURL=" + options.outSourceMap;
|
||||
}
|
||||
|
||||
var source_map = output.source_map;
|
||||
if (source_map) {
|
||||
source_map = source_map + "";
|
||||
}
|
||||
|
||||
return {
|
||||
code : stream + "",
|
||||
map : output.source_map + ""
|
||||
map : source_map
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user