Skip to content

Commit ecf7b07

Browse files
VoltrexKeyvaruyadorno
authored andcommitted
tls: use logical OR operator
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]>
1 parent 2cf3ce8 commit ecf7b07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/tls/secure-context.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function configSecureContext(context, options = kEmptyObject, name = 'options')
265265
if (pfx !== undefined && pfx !== null) {
266266
if (ArrayIsArray(pfx)) {
267267
ArrayPrototypeForEach(pfx, (val) => {
268-
const raw = val.buf ? val.buf : val;
268+
const raw = val.buf || val;
269269
const pass = val.passphrase || passphrase;
270270
if (pass !== undefined && pass !== null) {
271271
context.loadPKCS12(toBuf(raw), toBuf(pass));

0 commit comments

Comments
 (0)