DEBUG store

This commit is contained in:
2023-10-19 10:02:32 +08:00
parent 5e2205ecdc
commit 807dd17ad6
1 changed files with 4 additions and 3 deletions

View File

@ -26,10 +26,11 @@ export default class IndexedDB {
} }
async store(name) { async store(name) {
if (!this.db) return await this.open(name) if (!this.db) await this.open(name)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const request = this.db.transaction([name], 'readwrite').objectStore(name) const transaction = this.db.transaction([name], 'readwrite')
resolve(request) const objectStore = transaction.objectStore(name)
resolve(objectStore)
}) })
} }