Eliminate redundant try..catch

This commit is contained in:
Arthur Stolyar 2015-10-04 17:39:02 +03:00
parent a34a2b0e24
commit 5db310fa02
1 changed files with 2 additions and 5 deletions

View File

@ -258,12 +258,9 @@ HtmlWebpackPlugin.prototype.postProcessHtml = function(html, assets) {
.then(function(html) {
if (self.options.minify) {
var minify = require('html-minifier').minify;
try {
return minify(html, self.options.minify);
} catch(e) {
return Promise.reject(e);
}
return minify(html, self.options.minify);
}
return html;
});
};