Skip to content

Commit

Permalink
simplify nested ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
dmihalcik-virtru committed Nov 15, 2024
1 parent 748a4df commit 205f237
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/tdf3/src/tdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,10 @@ async function unwrapKey({
};
}

const poolSize = concurrencyLimit === undefined ? 1 : concurrencyLimit > 1 ? concurrencyLimit : 1;
let poolSize = 1;
if (concurrencyLimit !== undefined && concurrencyLimit > 1) {
poolSize = concurrencyLimit;
}
const splitPromises: Record<string, Promise<RewrapResponseData>> = {};
for (const splitId of Object.keys(splitPotentials)) {
const potentials = splitPotentials[splitId];
Expand Down

0 comments on commit 205f237

Please sign in to comment.