Skip to content

Commit

Permalink
events: convert errorMonitor to a normal property
Browse files Browse the repository at this point in the history
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 targos committed Apr 28, 2020
1 parent 8c497f8 commit 3241aee
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/events.js
Expand Up @@ -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, {
Expand Down

0 comments on commit 3241aee

Please sign in to comment.