diff options
author | Benjamin Gruenbaum <benjamingruenbaum@Benjamins-MacBook-Pro.local> | 2020-05-31 15:57:40 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-04 00:19:25 +0300 |
commit | 3a7a5d7e62859baf9e22645d2e9195e32cfb06c0 (patch) | |
tree | 5cfa9698950558eb1799cecaea74e2efac52d0c8 /lib/internal/event_target.js | |
parent | 673f49ac94f47700a7f8a1af082df6fa57c925ef (diff) |
events: deal with Symbol() passed to event constructor
PR-URL: https://github.com/nodejs/node/pull/33612
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/internal/event_target.js')
-rw-r--r-- | lib/internal/event_target.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/event_target.js b/lib/internal/event_target.js index 763542eb0fc..611aa992211 100644 --- a/lib/internal/event_target.js +++ b/lib/internal/event_target.js @@ -50,7 +50,7 @@ class Event { this.#cancelable = !!cancelable; this.#bubbles = !!bubbles; this.#composed = !!composed; - this.#type = String(type); + this.#type = `${type}`; // isTrusted is special (LegacyUnforgeable) Object.defineProperty(this, 'isTrusted', { get() { return false; }, |