From f4b634e03e29966630a4d5fc523e89716bd83a5d Mon Sep 17 00:00:00 2001 From: Pavel Meyer Date: Tue, 22 Oct 2024 14:21:01 +0300 Subject: [PATCH] Fixed eslint --- src/shared/utils/firebase.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/utils/firebase.tsx b/src/shared/utils/firebase.tsx index 8f30f7532..b7847c3db 100644 --- a/src/shared/utils/firebase.tsx +++ b/src/shared/utils/firebase.tsx @@ -1,4 +1,3 @@ -/* eslint-disable promise/always-return */ import firebase from "firebase/compat/app"; import "firebase/compat/auth"; import "firebase/compat/firestore"; @@ -34,6 +33,7 @@ function enableUnlimitedCachePersistence(): Promise { .enablePersistence({ synchronizeTabs: true }) // Enable persistence .then(() => { console.log("Persistence enabled successfully."); + return; }) .catch(handlePersistenceError); // Handle errors } @@ -70,6 +70,7 @@ function reinitializeFirestoreWithPersistence() { }) .then(() => { console.log("Persistence re-enabled."); + return; }) .catch(handlePersistenceError); // Handle any errors during reinitialization } @@ -89,6 +90,7 @@ export function clearFirestoreCache() { console.log("Cache cleared successfully."); reinitializeFirestoreWithPersistence(); // Reinitialize Firestore window.location.reload(); // Reload page to apply changes + return; }) .catch((err) => { if (err.code === "failed-precondition") { @@ -104,6 +106,7 @@ enableUnlimitedCachePersistence() .then(() => { console.log("Firestore persistence setup complete."); // You can now safely access Firestore (db) or perform any Firestore operations + return; }) .catch(() => { console.log("Firestore persistence setup error.");