repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a null or undefined condition
[e-mobility-charging-stations-simulator.git]
/
src
/
utils
/
CircularArray.ts
diff --git
a/src/utils/CircularArray.ts
b/src/utils/CircularArray.ts
index 08a37220c1469e255873ab06482a3193b4c25d87..5fdeeaad1f7e57c2dae60d0c6fe976d623c942bd 100644
(file)
--- a/
src/utils/CircularArray.ts
+++ b/
src/utils/CircularArray.ts
@@
-1,4
+1,4
@@
-// Copyright Jerome Benoit. 2021. All Rights Reserved.
+// Copyright Jerome Benoit. 2021
-2023
. All Rights Reserved.
export const DEFAULT_CIRCULAR_ARRAY_SIZE = Number.MAX_SAFE_INTEGER;
export const DEFAULT_CIRCULAR_ARRAY_SIZE = Number.MAX_SAFE_INTEGER;
@@
-47,7
+47,7
@@
export class CircularArray<T> extends Array<T> {
public splice(start: number, deleteCount?: number, ...items: T[]): T[] {
let itemsRemoved: T[];
public splice(start: number, deleteCount?: number, ...items: T[]): T[] {
let itemsRemoved: T[];
- if (arguments.length >= 3 &&
typeof deleteCount !== 'undefined'
) {
+ if (arguments.length >= 3 &&
deleteCount !== undefined
) {
itemsRemoved = super.splice(start, deleteCount);
// FIXME: that makes the items insert not in place
this.push(...items);
itemsRemoved = super.splice(start, deleteCount);
// FIXME: that makes the items insert not in place
this.push(...items);