-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
In my scenario if html-minify has error then whole server is down! I think, that html-minify must be in try{...}catch(err){...} to prevent server down, and if err then return original html;
this code:
` var sendMinified = function (callback) {
// No callback specified, just minify and send to client.
if (typeof callback === 'undefined') {
return function (err, html) {
if (err) {
return next(err);
}
html = minify(html, opts.htmlMinifier);<<<<<<<-------------- what if error occur???
res.send(html);
}
} else {
// Custom callback specified by user, use that one
return function (err, html) {
if (html) {
html = minify(html, opts.htmlMinifier);<<<<<<<--------------- what if error occur???
}
callback(err, html);
}
}
};`
Metadata
Metadata
Assignees
Labels
No labels