Ensure uglify options are set correctly.

This commit is contained in:
John-David Dalton
2016-01-07 21:20:22 -08:00
parent 5dc48d1a83
commit 6fa9490a13

View File

@@ -19,7 +19,7 @@ function minify(inpath, outpath, callback, options) {
if (!outpath) {
outpath = inpath.replace(/(?=\.js$)/, '.min');
}
var output = uglify.minify(inpath, _.defaults(options, uglifyOptions));
var output = uglify.minify(inpath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(outpath, output.code, 'utf-8', callback);
}