This:
|
if (this.entries.length > this.size) { |
|
this.entries.pop(0); |
|
} |
should've been using .shift(). Instead, current behaviour keeps pushing one item into the history and immediately popping it back, so that once limit is reached, no history items are stored.