From a6a1897fcfe1c57dc70c8339ef48653c779c3852 Mon Sep 17 00:00:00 2001 From: Mohammed Keyvanzadeh Date: Sun, 14 Aug 2022 20:18:16 +0430 Subject: [PATCH] tls: use logical OR operator Use the logical OR operator instead of the ternary operator where applicable. --- lib/internal/tls/secure-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/tls/secure-context.js b/lib/internal/tls/secure-context.js index a9bf4a1da71eca..3d2e4d6623e859 100644 --- a/lib/internal/tls/secure-context.js +++ b/lib/internal/tls/secure-context.js @@ -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));