repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4077981
)
refactor: use null test in circular array code
author
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 29 Jul 2023 14:17:38 +0000
(16:17 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 29 Jul 2023 14:17:38 +0000
(16:17 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/circular-array.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/circular-array.ts
b/src/circular-array.ts
index dadfa950043577a66d50387e59af621045bad66e..bb958d8287519acf91efc4c7a1468fe422da0a86 100644
(file)
--- a/
src/circular-array.ts
+++ b/
src/circular-array.ts
@@
-57,7
+57,7
@@
export class CircularArray<T> extends Array<T> {
...items: T[]
): CircularArray<T> {
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)