-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
tls: remove unnecessary type check on normalize #57336
base: main
Are you sure you want to change the base?
Conversation
@@ -1655,7 +1655,7 @@ function normalizeConnectArgs(listArgs) { | |||
// This means that options.host overrides a host arg. | |||
if (listArgs[1] !== null && typeof listArgs[1] === 'object') { | |||
ObjectAssign(options, listArgs[1]); | |||
} else if (listArgs[2] !== null && typeof listArgs[2] === 'object') { | |||
} else { |
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.
Specifically... for those who are unaware... Object.assign(options, ...)
works successfully for any value type.. That is, Object.assign(options, null)
still works as expected.
That said... @anonrig ... the same applies for the line above also... that can probably be simplified also.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57336 +/- ##
==========================================
- Coverage 90.19% 90.19% -0.01%
==========================================
Files 630 630
Lines 185195 185195
Branches 36249 36244 -5
==========================================
- Hits 167036 167032 -4
+ Misses 11132 11131 -1
- Partials 7027 7032 +5
🚀 New features to boost your workflow:
|
Following up on @jasnell's recommendation: cloudflare/workerd#3594 (comment)