From 7b24b85945846ad67d7e79b62377c59ef4859cba Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Sat, 2 Aug 2025 20:30:08 -0700 Subject: [PATCH] domain: remove deprecated API call --- lib/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/domain.js b/lib/domain.js index 03d240e98d4506..7dd16ee1bf59ef 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -270,7 +270,7 @@ Domain.prototype._errorHandler = function(er) { // as this would throw an error, make the process exit, and thus // prevent the process 'uncaughtException' event from being emitted // if a listener is set. - if (EventEmitter.listenerCount(this, 'error') > 0) { + if (this.listenerCount('error') > 0) { // Clear the uncaughtExceptionCaptureCallback so that we know that, since // the top-level domain is not active anymore, it would be ok to abort on // an uncaught exception at this point