Skip to content
Permalink
Browse files

events: convert errorMonitor to a normal property

Convert property errorMonitor to a normal property as non-writable
caused unwanted side effects.

Refs: #30932 (comment)

PR-URL: #31848
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Flarna authored and MylesBorins committed Feb 18, 2020
1 parent be90817 commit 3c8daa3aa04dd06389722f180ba4e35fc61b8806
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/events.js
@@ -90,12 +90,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, {

0 comments on commit 3c8daa3

Please sign in to comment.
You can’t perform that action at this time.