fix: early exit transaction if no operations

This commit is contained in:
Chance Hudson
2021-04-14 23:51:00 -05:00
parent 4e8f3217dd
commit 17975eb650

View File

@@ -427,6 +427,8 @@ export class IndexedDBConnector extends DB {
// to be accessed. Once that is done create the transaction and call the
// start function to begin executing the transaction operations
operation(db)
// no operations to commit
if (!stores.length) return (start as Function)()
// get a unique list of stores
const storeNames = {}
const storesUnique = stores.filter(store => {