0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix: lodash instead typeof

This commit is contained in:
Juan Picado @jotadeveloper 2017-07-13 19:54:33 +02:00
parent 68a559ebac
commit a6d6e58a80
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -104,7 +104,7 @@ module.exports = function(config_hash) {
if (err.code === 'ECONNABORT' && res.statusCode === 304) {
return next();
}
if (typeof res.report_error !== 'function') {
if (_.isFunction(res.report_error) === false) {
// in case of very early error this middleware may not be loaded before error is generated
// fixing that
error_reporting_middleware(req, res, _.noop);