diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-17 01:03:55 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-17 01:03:55 +0200 |
commit | d947b90df330d8e3598fd95ccacb8d511923ead8 (patch) | |
tree | e9bcb839fdc8c24637fc12ec09ca7c7ca06f4aec /packages/idb-bridge/src/BridgeIDBObjectStore.ts | |
parent | 3263d05ce957a3f81234749eb9eefc0bce7ff645 (diff) |
idb-bridge: indexes belong to object stores
Diffstat (limited to 'packages/idb-bridge/src/BridgeIDBObjectStore.ts')
-rw-r--r-- | packages/idb-bridge/src/BridgeIDBObjectStore.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/idb-bridge/src/BridgeIDBObjectStore.ts b/packages/idb-bridge/src/BridgeIDBObjectStore.ts index 81df5fd01..22bcc32f8 100644 --- a/packages/idb-bridge/src/BridgeIDBObjectStore.ts +++ b/packages/idb-bridge/src/BridgeIDBObjectStore.ts @@ -63,7 +63,7 @@ class BridgeIDBObjectStore { get indexNames(): FakeDOMStringList { return fakeDOMStringList( - this._schema.objectStores[this._name].indexes, + Object.keys(this._schema.objectStores[this._name].indexes), ).sort(); } @@ -404,7 +404,7 @@ class BridgeIDBObjectStore { return new BridgeIDBIndex(this, name); } - public deleteIndex(name: string) { + public deleteIndex(indexName: string) { if (arguments.length === 0) { throw new TypeError(); } @@ -419,12 +419,12 @@ class BridgeIDBObjectStore { const { btx } = this._confirmActiveTransaction(); - const index = this._indexesCache.get(name); + const index = this._indexesCache.get(indexName); if (index !== undefined) { index._deleted = true; } - this._backend.deleteIndex(btx, name); + this._backend.deleteIndex(btx, this._name, indexName); } // http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBObjectStore-count-IDBRequest-any-key |