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; return;
} }
const cas = Array.isArray(globalAgent.options.ca) const cas = (() => {
? globalAgent.options.ca if (Array.isArray(globalAgent.options.ca)) {
: globalAgent.options.ca return globalAgent.options.ca;
? [globalAgent.options.ca] }
: [];
if (globalAgent.options.ca) {
return [globalAgent.options.ca];
}
return [];
})();
for (const cert of certs) { for (const cert of certs) {
if (!isCertActive(cert)) { if (!isCertActive(cert)) {