diff options
author | Richard van Velzen <rvanvelzen1@gmail.com> | 2015-01-26 12:07:44 +0100 |
---|---|---|
committer | Richard van Velzen <rvanvelzen1@gmail.com> | 2015-01-26 12:07:44 +0100 |
commit | d78ae20e64a6449b63ac86c225f0fe7faae353bd (patch) | |
tree | 8482e8585a090e91861b1dbe706df3c3525bde81 | |
parent | 5c02d65ddb8d315d53a4356c038b461ddb1cb029 (diff) | |
download | tracifyjs-d78ae20e64a6449b63ac86c225f0fe7faae353bd.tar.gz tracifyjs-d78ae20e64a6449b63ac86c225f0fe7faae353bd.zip |
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
-rw-r--r-- | tools/node.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/node.js b/tools/node.js index 4bc8517b..1ae69da8 100644 --- a/tools/node.js +++ b/tools/node.js @@ -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 }; }; |