Skip to content

Commit 70eaf55

Browse files
dnlupnodejs-github-bot
authored andcommitted
http: fix lint error in incoming message
PR-URL: #33035 Refs: #30625 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 6120028 commit 70eaf55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/_http_incoming.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ IncomingMessage.prototype._dump = function _dump() {
359359
};
360360

361361
function onError(instance, cb, error) {
362-
instance.listenerCount('error') > 0 ? cb(error) : cb();
362+
if (instance.listenerCount('error') > 0) {
363+
cb(error);
364+
} else {
365+
cb();
366+
}
363367
}
364368

365369
module.exports = {

0 commit comments

Comments
 (0)