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:
parent
386cf3b87b
commit
1e179bfab3
@ -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)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user