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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
ce62e963a1
commit
82f89ec8c1
@ -1114,20 +1114,14 @@ Server.prototype.setSecureContext = function(options) {
|
||||
else
|
||||
this.crl = undefined;
|
||||
|
||||
if (options.sigalgs !== undefined)
|
||||
this.sigalgs = options.sigalgs;
|
||||
else
|
||||
this.sigalgs = undefined;
|
||||
this.sigalgs = options.sigalgs;
|
||||
|
||||
if (options.ciphers)
|
||||
this.ciphers = options.ciphers;
|
||||
else
|
||||
this.ciphers = undefined;
|
||||
|
||||
if (options.ecdhCurve !== undefined)
|
||||
this.ecdhCurve = options.ecdhCurve;
|
||||
else
|
||||
this.ecdhCurve = undefined;
|
||||
this.ecdhCurve = options.ecdhCurve;
|
||||
|
||||
if (options.dhparam)
|
||||
this.dhparam = options.dhparam;
|
||||
|
Loading…
x
Reference in New Issue
Block a user