- aggiornamento con proj RISO. postcss, pwa.
This commit is contained in:
@@ -77,17 +77,19 @@ export let idbKeyval = (() => {
|
||||
}
|
||||
},
|
||||
async getalldata(table) {
|
||||
let req;
|
||||
await withStore('readonly', table, store => {
|
||||
req = store.getAll();
|
||||
// console.log(' req', req)
|
||||
});
|
||||
if (req) {
|
||||
return req.result;
|
||||
} else {
|
||||
return null;
|
||||
try {
|
||||
let result;
|
||||
await withStore('readonly', table, store => {
|
||||
const req = store.getAll();
|
||||
req.onsuccess = () => (result = req.result);
|
||||
});
|
||||
return result || [];
|
||||
} catch (error) {
|
||||
console.error('Errore durante getalldata:', error);
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
async count(table) {
|
||||
let req;
|
||||
await withStore('readonly', table, store => {
|
||||
|
||||
Reference in New Issue
Block a user