From c483e6dc3f921905275b99e16c6a3079f18e7ab7 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Tue, 18 Feb 2020 15:33:31 +0100 Subject: [PATCH] events: convert errorMonitor to a normal property Convert property errorMonitor to a normal property as non-writable caused unwanted side effects. Refs: https://github.com/nodejs/node/pull/30932#discussion_r379679982 --- lib/events.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/events.js b/lib/events.js index c3ac526a5c2d45..b138979e138fdf 100644 --- a/lib/events.js +++ b/lib/events.js @@ -89,12 +89,7 @@ ObjectDefineProperty(EventEmitter, 'captureRejections', { enumerable: true }); -ObjectDefineProperty(EventEmitter, 'errorMonitor', { - value: kErrorMonitor, - writable: false, - configurable: true, - enumerable: true -}); +EventEmitter.errorMonitor = kErrorMonitor; // The default for captureRejections is false ObjectDefineProperty(EventEmitter.prototype, kCapture, {