splice to ensure shifts never fall behind
This commit is contained in:
parent
903343fbdf
commit
3998b688ab
@ -73,7 +73,7 @@ class TimeTracker {
|
||||
array.push(value)
|
||||
|
||||
if (array.length > maxLength) {
|
||||
array.shift()
|
||||
array.splice(0, array.length - maxLength)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user