http: fix lint error in incoming message
PR-URL: https://github.com/nodejs/node/pull/33035 Refs: https://github.com/nodejs/node/issues/30625 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
6120028ee3
commit
70eaf55a9d
@ -359,7 +359,11 @@ IncomingMessage.prototype._dump = function _dump() {
|
||||
};
|
||||
|
||||
function onError(instance, cb, error) {
|
||||
instance.listenerCount('error') > 0 ? cb(error) : cb();
|
||||
if (instance.listenerCount('error') > 0) {
|
||||
cb(error);
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user