mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-01-12 00:03:44 +00:00
This commit is contained in:
parent
8d71c5bff3
commit
4cc35e56d9
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.4.158",
|
||||
"version": "6.4.159",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ export const makeDefaultStorage = (opts?: StorageOptions): DefaultStorage => {
|
|||
},
|
||||
|
||||
readData (): Promise<SerializedEntries> {
|
||||
const data = Object.create(null)
|
||||
return database$
|
||||
.then(database => {
|
||||
const transaction = database.transaction(
|
||||
|
|
@ -159,6 +160,7 @@ export const makeDefaultStorage = (opts?: StorageOptions): DefaultStorage => {
|
|||
const request = store.get(key)
|
||||
request.onsuccess = () => {
|
||||
if (key === timestamp) { Object.assign(batch, request.result) }
|
||||
Object.assign(data, request.result)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +171,7 @@ export const makeDefaultStorage = (opts?: StorageOptions): DefaultStorage => {
|
|||
return getTransactionPromise(transaction)
|
||||
})
|
||||
.then(
|
||||
() => batch,
|
||||
() => data,
|
||||
() => batch
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue