From fe11837a61b0dae268c98cb4ce7bb21c6f10b1e6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 19 May 2017 19:11:28 -0700 Subject: [PATCH] Create new entries when shifting --- src/utils/CircularList.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/CircularList.ts b/src/utils/CircularList.ts index 1a698ff0..bc693260 100644 --- a/src/utils/CircularList.ts +++ b/src/utils/CircularList.ts @@ -197,7 +197,10 @@ export class CircularList extends EventEmitter { if (offset > 0) { for (let i = count - 1; i >= 0; i--) { - this._setEntry(start + i + offset, this.getEntry(start + i)); + this._setEntry(start + i + offset, { + id: this._nextId++, + value: this.get(start + i) + }); } const expandListBy = (start + count + offset) - this._length; if (expandListBy > 0) {