From 01a4b443b0921bc936a6b91dec8a426aed249485 Mon Sep 17 00:00:00 2001 From: Andrey Mikhadyuk Date: Wed, 27 Sep 2023 13:58:14 +0300 Subject: [PATCH] add firestore persistence for multiple tabs --- 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 d1643fa017..57d0f0f0e7 100644 --- a/src/shared/utils/firebase.tsx +++ b/src/shared/utils/firebase.tsx @@ -23,7 +23,10 @@ if (REACT_APP_ENV === Environment.Local) { } else { firebase .firestore() - .enablePersistence() + .enablePersistence({ + synchronizeTabs: true, + experimentalForceOwningTab: false, + }) .catch((error) => { console.error("Error enabling persistence", error); });