From c250df1a2f47a1313ec79c34458e0dbe278b8791 Mon Sep 17 00:00:00 2001 From: Ong Jun Xiong Date: Sat, 11 Nov 2023 19:09:09 +0800 Subject: [PATCH] fixed bug --- frontend/src/hooks/useCollaboration.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks/useCollaboration.tsx b/frontend/src/hooks/useCollaboration.tsx index 1b1b6b36..0b678849 100644 --- a/frontend/src/hooks/useCollaboration.tsx +++ b/frontend/src/hooks/useCollaboration.tsx @@ -70,7 +70,7 @@ const useCollaboration = ({ // }, [id, currentUser]); useEffect(() => { - if (currentUser) { + if (currentUser && roomId) { currentUser.getIdToken(true).then((token) => { const socketConnection = io(wsCollaborationProxyGatewayAddress, { extraHeaders: {