diff options
author | Benjamin Gruenbaum <benjamingr@gmail.com> | 2020-05-28 17:43:11 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-06 02:27:04 +0300 |
commit | 1969ada9824cb01c2ba46470faa5327a9c2ef263 (patch) | |
tree | 11fa0ebb9bb61f1a3d04b36c5a420a55034766ce /lib/internal/event_target.js | |
parent | 236237829b26c1756104b5a37797a591e8a5aba6 (diff) |
events: set target property to null
PR-URL: https://github.com/nodejs/node/pull/33615
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'lib/internal/event_target.js')
-rw-r--r-- | lib/internal/event_target.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/internal/event_target.js b/lib/internal/event_target.js index 47f7b1d592a..df25200f1b0 100644 --- a/lib/internal/event_target.js +++ b/lib/internal/event_target.js @@ -64,6 +64,7 @@ class Event { enumerable: true, configurable: false }); + this[kTarget] = null; } [customInspectSymbol](depth, options) { @@ -245,7 +246,7 @@ class EventTarget { } if (this.#emitting.has(event.type) || - event[kTarget] !== undefined) { + event[kTarget] !== null) { throw new ERR_EVENT_RECURSION(event.type); } |