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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matheus Marchini <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Flarna authored and mmarchini committed Mar 2, 2020
1 parent 5e1f059 commit ed8007a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit ed8007a

Please sign in to comment.