Fix database worker for when indexeddb is disabled
This commit is contained in:
parent
7ac555baa0
commit
025304ee44
@ -6,10 +6,12 @@ import { getDatabase } from "../database";
|
||||
let obj = {
|
||||
data: [],
|
||||
async loadData(table) {
|
||||
let db = getDatabase({});
|
||||
this.data = [];
|
||||
// Use a cursor instead of toArray to prevent IPC max size error
|
||||
await db.table(table).each((map) => this.data.push(map));
|
||||
try {
|
||||
let db = getDatabase({});
|
||||
// Use a cursor instead of toArray to prevent IPC max size error
|
||||
await db.table(table).each((map) => this.data.push(map));
|
||||
} catch {}
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user