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 <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
VoltrexKeyva authored and ruyadorno committed Aug 22, 2022
1 parent 2cf3ce8 commit ecf7b07
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 ecf7b07

Please sign in to comment.