console: don't attach unnecessary error handlers · nodejs/node@da102cd · GitHub
Skip to content

Commit da102cd

Browse files
cjihrigtargos
authored andcommitted
console: don't attach unnecessary error handlers
A noop error handler is attached to the console's stream on write. The handler is then immediately removed after the write. This commit skips adding the error handler if one already exists. PR-URL: #27691 Fixes: #27687 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 6984ca1 commit da102cd

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

lib/internal/console/constructor.js

Lines changed: 2 additions & 1 deletion
Lines changed: 16 additions & 0 deletions

0 commit comments

Comments
 (0)