Fix sourceMapIncludeSources exception in Node API
authorebednarz <github@bednarz.nl>
Sun, 13 Apr 2014 09:16:10 +0000 (11:16 +0200)
committerebednarz <github@bednarz.nl>
Sun, 13 Apr 2014 09:16:10 +0000 (11:16 +0200)
https://github.com/mishoo/UglifyJS2/issues/459

tools/node.js

index bef296e..04e67e7 100644 (file)
@@ -115,7 +115,7 @@ exports.minify = function(files, options) {
         if (options.sourceMapIncludeSources) {
             for (var file in sourcesContent) {
                 if (sourcesContent.hasOwnProperty(file)) {
-                    options.source_map.get().setSourceContent(file, sourcesContent[file]);
+                    output.source_map.get().setSourceContent(file, sourcesContent[file]);
                 }
             }
         }