Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 69f2634

Browse filesBrowse files
cjihrigtargos
authored andcommitted
tls: simplify setSecureContext() option parsing
The following pattern is redundant, so remove it: if (options.foo !== undefined) this.foo = options.foo; else this.foo = undefined; PR-URL: #29704 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 0041f1c commit 69f2634
Copy full SHA for 69f2634

File tree

Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,20 +1114,14 @@ Server.prototype.setSecureContext = function(options) {
11141114
else
11151115
this.crl = undefined;
11161116

1117-
if (options.sigalgs !== undefined)
1118-
this.sigalgs = options.sigalgs;
1119-
else
1120-
this.sigalgs = undefined;
1117+
this.sigalgs = options.sigalgs;
11211118

11221119
if (options.ciphers)
11231120
this.ciphers = options.ciphers;
11241121
else
11251122
this.ciphers = undefined;
11261123

1127-
if (options.ecdhCurve !== undefined)
1128-
this.ecdhCurve = options.ecdhCurve;
1129-
else
1130-
this.ecdhCurve = undefined;
1124+
this.ecdhCurve = options.ecdhCurve;
11311125

11321126
if (options.dhparam)
11331127
this.dhparam = options.dhparam;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.