diff options
author | Daniele Belardi <dwon.dnl@gmail.com> | 2020-12-09 08:05:00 +0100 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2020-12-21 18:24:28 +0100 |
commit | 4b81d79b58650df5bdd42a9ba4e2e0ec81aca9a3 (patch) | |
tree | b20a1c660dd0686219a537178c41a19fbd49f0db | |
parent | 397e31e25f28619d019fcd96eb292395ddff449d (diff) | |
download | node-new-4b81d79b58650df5bdd42a9ba4e2e0ec81aca9a3.tar.gz |
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>
-rw-r--r-- | lib/_http_incoming.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index d0c7ce9ba2..1b6099a89d 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -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 = { |