1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 16:20:09 +02:00

Merge remote-tracking branch 'origin/master' into manifestv3

This commit is contained in:
Kushagra Gour
2024-05-09 17:26:50 +05:30
26 changed files with 2356 additions and 1536 deletions

View File

@@ -48,13 +48,7 @@ export const itemService = {
async getAllItems(shouldFetchLocally) {
var t = Date.now();
var d = deferred();
let itemIds = await this.getUserItemIds(shouldFetchLocally);
itemIds = Object.getOwnPropertyNames(itemIds || {});
// log('itemids', itemIds);
if (!itemIds.length) {
d.resolve([]);
}
const items = [];
if (window.user && !shouldFetchLocally) {
@@ -76,6 +70,13 @@ export const itemService = {
d.resolve([]);
});
} else {
let itemIds = await this.getUserItemIds(shouldFetchLocally);
itemIds = Object.getOwnPropertyNames(itemIds || {});
if (!itemIds.length) {
d.resolve([]);
}
for (let i = 0; i < itemIds.length; i++) {
/* eslint-disable no-loop-func */
window.db.local.get(itemIds[i], itemResult => {