From c95772ca98cc78c7acd35b070afa3a3a7331ac4b Mon Sep 17 00:00:00 2001 From: stdavis Date: Mon, 21 Oct 2024 15:31:04 -0600 Subject: [PATCH] chore: prevent auth emulator errors when hot module reloading in dev --- src/App.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 91cea8d..5dd42eb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -84,8 +84,10 @@ export default function App() { useEffect(() => { if (app && import.meta.env.DEV) { const auth = getAuth(app); - console.log('connecting to auth emulator'); - connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true }); + if (!auth.emulatorConfig) { + console.log('connecting to auth emulator'); + connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true }); + } } }, [app]);