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: nodejs/node#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 guangwong committed Jan 3, 2023
1 parent 5a6fbd0 commit 3e96eaa
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 3e96eaa

Please sign in to comment.