From 1b6e07ba4d366d3ef1df94a44361010e928f279a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 29 Jul 2023 16:17:38 +0200 Subject: [PATCH] refactor: use null test in circular array code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/circular-array.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.34.1