diff --git a/src/matrix/storage/idb/stores/TimelineEventStore.js b/src/matrix/storage/idb/stores/TimelineEventStore.js index a6ce5617..fc7a07ca 100644 --- a/src/matrix/storage/idb/stores/TimelineEventStore.js +++ b/src/matrix/storage/idb/stores/TimelineEventStore.js @@ -19,7 +19,7 @@ class Range { if (this._lower && !this._upper) { return IDBKeyRange.bound( [roomId, this._lower.fragmentId, this._lower.eventIndex], - [roomId, EventKey.maxKey.fragmentId, EventKey.maxKey.eventIndex], + [roomId, this._lower.fragmentId, EventKey.maxKey.eventIndex], this._lowerOpen, false ); @@ -28,7 +28,7 @@ class Range { // also bound as we don't want to move into another roomId if (!this._lower && this._upper) { return IDBKeyRange.bound( - [roomId, EventKey.minKey.fragmentId, EventKey.minKey.eventIndex], + [roomId, this._upper.fragmentId, EventKey.minKey.eventIndex], [roomId, this._upper.fragmentId, this._upper.eventIndex], false, this._upperOpen