aboutsummaryrefslogtreecommitdiff
path: root/src/routes/Routes.tsx
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-04-13 12:32:04 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-04-13 12:32:04 -0700
commitd074b671293c8038935674ebfb990e844128cf07 (patch)
treecc5694a2684c7faeda360a7b239d976a4c60edbb /src/routes/Routes.tsx
parent1c7690a3b398e12834aa2aaa0b7c34c9e9a65821 (diff)
Stale token replaced
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(() => {