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/BridgeIDBIndex.ts | |
parent | 3263d05ce957a3f81234749eb9eefc0bce7ff645 (diff) | |
download | wallet-core-d947b90df330d8e3598fd95ccacb8d511923ead8.tar.xz |
idb-bridge: indexes belong to object stores
Diffstat (limited to 'packages/idb-bridge/src/BridgeIDBIndex.ts')
-rw-r--r-- | packages/idb-bridge/src/BridgeIDBIndex.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/idb-bridge/src/BridgeIDBIndex.ts b/packages/idb-bridge/src/BridgeIDBIndex.ts index b890defc0..5be80ba71 100644 --- a/packages/idb-bridge/src/BridgeIDBIndex.ts +++ b/packages/idb-bridge/src/BridgeIDBIndex.ts @@ -59,15 +59,15 @@ export class BridgeIDBIndex { } get keyPath(): KeyPath { - return this._schema.indexes[this._name].keyPath; + return this._schema.objectStores[this.objectStore.name].indexes[this._name].keyPath; } get multiEntry(): boolean { - return this._schema.indexes[this._name].multiEntry; + return this._schema.objectStores[this.objectStore.name].indexes[this._name].multiEntry; } get unique(): boolean { - return this._schema.indexes[this._name].unique; + return this._schema.objectStores[this.objectStore.name].indexes[this._name].unique; } get _backend(): Backend { @@ -112,7 +112,7 @@ export class BridgeIDBIndex { return; } - this._backend.renameIndex(btx, oldName, newName); + this._backend.renameIndex(btx, this.objectStore.name, oldName, newName); if (this.objectStore.indexNames.indexOf(name) >= 0) { throw new ConstraintError(); |