-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
events: allow null/undefined eventInitDict #54643
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54643 +/- ##
==========================================
- Coverage 87.34% 87.30% -0.05%
==========================================
Files 649 649
Lines 182706 182755 +49
Branches 35046 35052 +6
==========================================
- Hits 159590 159558 -32
- Misses 16388 16464 +76
- Partials 6728 6733 +5
|
This feature changes an existing behavior (shown below): $ node -e "new Event('', null);"
node:internal/errors:540
throw error;
^
TypeError [ERR_INVALID_ARG_TYPE]: The "options" argument must be of type object. Received null
at new Event (node:internal/event_target:117:5)
at [eval]:1:1
at runScriptInThisContext (node:internal/vm:209:10)
at node:internal/process/execution:118:14
at [eval]-wrapper:6:24
at runScript (node:internal/process/execution:101:62)
at evalScript (node:internal/process/execution:136:3)
at node:internal/main/eval_string:55:3 {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v22.7.0 Is it |
this is a bug fix |
ahh okay, thanks for the clarification. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
the ci is killing me |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@@ -111,14 +111,14 @@ class Event { | |||
* composed?: boolean, | |||
* }} [options] | |||
*/ | |||
constructor(type, options = kEmptyObject) { | |||
constructor(type, options = undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also update jsdoc?
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
PR is currently blocked from landing by unreliable CI. |
This comment was marked as outdated.
This comment was marked as outdated.
PR-URL: #54643 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in a9081b5 |
No description provided.