1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Rewrite ternary as IIFE

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-11-24 11:26:14 -05:00
parent 386cf3b87b
commit 1e179bfab3

View File

@ -29,11 +29,17 @@ const injectSystemCAsInjectable = getInjectable({
return;
}
const cas = Array.isArray(globalAgent.options.ca)
? globalAgent.options.ca
: globalAgent.options.ca
? [globalAgent.options.ca]
: [];
const cas = (() => {
if (Array.isArray(globalAgent.options.ca)) {
return globalAgent.options.ca;
}
if (globalAgent.options.ca) {
return [globalAgent.options.ca];
}
return [];
})();
for (const cert of certs) {
if (!isCertActive(cert)) {