Skip to content

Commit

Permalink
tls: use logical OR operator
Browse files Browse the repository at this point in the history
Use the logical OR operator instead of the ternary operator where
applicable.

PR-URL: #44236
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
VoltrexKeyva authored and targos committed Sep 5, 2022
1 parent 4752e6a commit a5ff6f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/tls/secure-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function configSecureContext(context, options = kEmptyObject, name = 'options')
if (pfx !== undefined && pfx !== null) {
if (ArrayIsArray(pfx)) {
ArrayPrototypeForEach(pfx, (val) => {
const raw = val.buf ? val.buf : val;
const raw = val.buf || val;
const pass = val.passphrase || passphrase;
if (pass !== undefined && pass !== null) {
context.loadPKCS12(toBuf(raw), toBuf(pass));
Expand Down

0 comments on commit a5ff6f6

Please sign in to comment.