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 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
5e1f059db4
commit
ed8007af0b
@ -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, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user