Skip to content

Commit

Permalink
chore: prevent auth emulator errors when hot module reloading in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Oct 29, 2024
1 parent 643fdf3 commit c95772c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit c95772c

Please sign in to comment.