Skip to content

Commit

Permalink
Make empty source map values more reasonable in .minify()
Browse files Browse the repository at this point in the history
`"null"` isn't a very usable value. `JSON.parse(null)` also gives `null`, which makes this fully backwards compatible.

Closes #616
  • Loading branch information
rvanvelzen committed Jan 26, 2015
1 parent 5c02d65 commit d78ae20
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
};

Expand Down

0 comments on commit d78ae20

Please sign in to comment.