Skip to content

Commit

Permalink
fix: conditional if https
Browse files Browse the repository at this point in the history
Co-authored-by: Zoltan Kochan <[email protected]>
  • Loading branch information
nachoaldamav and zkochan committed Jan 18, 2024
1 parent 6f691da commit ab232be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions network/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit ab232be

Please sign in to comment.