diff --git a/src/matrix/storage/idb/Store.ts b/src/matrix/storage/idb/Store.ts index 64943d1b..8063a4c8 100644 --- a/src/matrix/storage/idb/Store.ts +++ b/src/matrix/storage/idb/Store.ts @@ -35,15 +35,14 @@ class QueryTargetWrapper { } get keyPath(): string | string[] { - if ("objectStore" in this._qt) { - return this._qt.objectStore.keyPath; - } else { - return this._qt.keyPath; - } + return this._qtStore.keyPath; } get _qtStore(): IDBObjectStore { - return this._qt as IDBObjectStore; + if ("objectStore" in this._qt) { + return this._qt.objectStore; + } + return this._qt; } supports(methodName: string): boolean {