瀏覽代碼

skip deleted collections

Abhinav-grd 4 年之前
父節點
當前提交
72fab5db92
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/services/collectionService.ts

+ 2 - 1
src/services/collectionService.ts

@@ -119,7 +119,8 @@ export const fetchUpdatedCollections = async (token: string, key: string) => {
     });
     let collections = [];
     for (const [_, collection] of latestCollectionsInstances) {
-        collections.push(collection);
+        if (!collection.isDeleted)
+            collections.push(collection);
     }
     await localForage.setItem('fav-collection', favCollection);
     await localForage.setItem('collections', collections);