You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
}
};`
The text was updated successfully, but these errors were encountered:
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) {
The text was updated successfully, but these errors were encountered: