From a6d6e58a80385c6a54e5c87d9b86369cc0d861b6 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Thu, 13 Jul 2017 19:54:33 +0200 Subject: [PATCH] fix: lodash instead typeof --- src/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/index.js b/src/api/index.js index 4d96094bb..89dd1e86e 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -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);