fixup
This commit is contained in:
parent
bfa7c1af14
commit
364d757666
|
@ -75,7 +75,8 @@ export class IndexedDBEngine {
|
|||
})
|
||||
}
|
||||
|
||||
close () {
|
||||
return closeDatabase(DB_NAME)
|
||||
async close () {
|
||||
await closeDatabase(DB_NAME)
|
||||
this._db = null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ export async function getEmojiByUnicode (unicode) {
|
|||
}
|
||||
|
||||
export async function closeDatabase () {
|
||||
await init()
|
||||
return idbEngine.close()
|
||||
if (idbEngine) {
|
||||
await idbEngine.readyPromise
|
||||
await idbEngine.close()
|
||||
idbEngine = undefined
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue