From: Jérôme Benoit Date: Sat, 29 Jul 2023 14:17:38 +0000 (+0200) Subject: refactor: use null test in circular array code X-Git-Tag: v2.6.21~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1b6e07ba4d366d3ef1df94a44361010e928f279a;p=poolifier.git refactor: use null test in circular array code Signed-off-by: Jérôme Benoit --- diff --git a/src/circular-array.ts b/src/circular-array.ts index dadfa950..bb958d82 100644 --- a/src/circular-array.ts +++ b/src/circular-array.ts @@ -57,7 +57,7 @@ export class CircularArray extends Array { ...items: T[] ): CircularArray { let itemsRemoved: T[] = [] - if (arguments.length >= 3 && deleteCount !== undefined) { + if (arguments.length >= 3 && deleteCount != null) { itemsRemoved = super.splice(start, deleteCount, ...items) if (this.length > this.size) { const itemsOverflowing = super.splice(0, this.length - this.size)