Skip to content

Commit

Permalink
fix(dcons): #325 replace nullish coalescing operator
Browse files Browse the repository at this point in the history
- refactor using ternary op
- AFAICT only occurrence in entire umbrella repo
  • Loading branch information
postspectacular committed Oct 28, 2021
1 parent 5733fc4 commit b8ddad7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/dcons/src/dcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ export class DCons<T>
shuffle(iter?: number, rnd: IRandom = SYSTEM) {
if (this._length < 2) return this;
for (
iter = iter ?? Math.ceil(1.5 * Math.log2(this._length));
iter =
iter !== undefined
? iter
: Math.ceil(1.5 * Math.log2(this._length));
iter > 0;
iter--
) {
Expand Down

0 comments on commit b8ddad7

Please sign in to comment.