From ab232be7dd3f20feb8ff9e096185a50048c74d00 Mon Sep 17 00:00:00 2001 From: Nacho Aldama Date: Thu, 18 Jan 2024 23:36:03 +0100 Subject: [PATCH] fix: conditional if https Co-authored-by: Zoltan Kochan --- network/agent/agent.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network/agent/agent.ts b/network/agent/agent.ts index 512b9ae..bba86be 100644 --- a/network/agent/agent.ts +++ b/network/agent/agent.ts @@ -37,14 +37,14 @@ function getNonProxyAgent (uri: string, opts: AgentOptions) { isHttps ? Boolean(opts.strictSsl).toString() : '>no-strict-ssl<' }`, `ca:${ - (isHttps && clientCertificates?.ca) || opts.ca?.toString() || '>no-ca<' + isHttps && (clientCertificates?.ca || opts.ca?.toString()) || '>no-ca<' }`, `cert:${ - (isHttps && clientCertificates?.cert) || - opts.cert?.toString() || + isHttps && (clientCertificates?.cert || + opts.cert?.toString()) || '>no-cert<' }`, - `key:${(isHttps && clientCertificates?.key) || opts.key || '>no-key<'}`, + `key:${isHttps && (clientCertificates?.key || opts.key) || '>no-key<'}`, ].join(':') /* eslint-enable @typescript-eslint/prefer-nullish-coalescing */