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 = {
|
let obj = {
|
||||||
data: [],
|
data: [],
|
||||||
async loadData(table) {
|
async loadData(table) {
|
||||||
let db = getDatabase({});
|
|
||||||
this.data = [];
|
this.data = [];
|
||||||
// Use a cursor instead of toArray to prevent IPC max size error
|
try {
|
||||||
await db.table(table).each((map) => this.data.push(map));
|
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