aboutsummaryrefslogtreecommitdiff
path: root/src/routes/Routes.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/Routes.tsx')
-rw-r--r--src/routes/Routes.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx
index 5ce0c771..04c081da 100644
--- a/src/routes/Routes.tsx
+++ b/src/routes/Routes.tsx
@@ -58,7 +58,9 @@ const Routes: React.FC = () => {
}, []);
useEffect(() => {
- connectChatAccount(loggedInUserId, chatClient);
+ if (loggedInUserId) {
+ connectChatAccount(loggedInUserId, chatClient);
+ }
}, [loggedInUserId]);
useEffect(() => {