Skip to content

Commit

Permalink
Resolves #1418
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Oct 27, 2021
1 parent 40ea83c commit 3ea4f40
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/classes/version/schema-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,8 @@ export function createMissingTables(newSchema: DbSchema, idbtrans: IDBTransactio
}

export function deleteRemovedTables(newSchema: DbSchema, idbtrans: IDBTransaction) {
for (var i = 0; i < idbtrans.db.objectStoreNames.length; ++i) {
var storeName = idbtrans.db.objectStoreNames[i];
if (newSchema[storeName] == null) {
idbtrans.db.deleteObjectStore(storeName);
}
}
[].slice.call(idbtrans.db.objectStoreNames).forEach(storeName =>
newSchema[storeName] == null && idbtrans.db.deleteObjectStore(storeName));
}

export function addIndex(store: IDBObjectStore, idx: IndexSpec) {
Expand Down

0 comments on commit 3ea4f40

Please sign in to comment.