add collectionToRemove not found locally check

This commit is contained in:
Abhinav 2022-01-26 12:57:33 +05:30
parent f674c8bc70
commit 36c2c77546

View file

@ -288,6 +288,9 @@ export const removePublicCollectionWithFiles = async (
const collectionToRemove = publicCollections.find(
(collection) => (collection.key = collectionKey)
);
if (!collectionToRemove) {
return;
}
await localForage.setItem(
PUBLIC_COLLECTIONS_TABLE,
publicCollections.filter(