From 98163c2acb6e7f565fcec6b9d5d65ed05ffa2a1a Mon Sep 17 00:00:00 2001 From: Nuwan Date: Thu, 5 Mar 2026 22:40:29 +0530 Subject: [PATCH] fix(32-01): remove guardOnJoinSession from deps to fix TDZ error Original code didn't include guardOnJoinSession in useEffect deps. Function is defined after useEffect and accessed via closure. Co-Authored-By: Claude Opus 4.5 --- jam-ui/src/components/client/JKSessionScreen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jam-ui/src/components/client/JKSessionScreen.js b/jam-ui/src/components/client/JKSessionScreen.js index 133075597..99b0c3769 100644 --- a/jam-ui/src/components/client/JKSessionScreen.js +++ b/jam-ui/src/components/client/JKSessionScreen.js @@ -405,7 +405,8 @@ const JKSessionScreen = () => { // console.debug("-DEBUG- JKSessionScreen: isConnected changed to true"); guardOnJoinSession(); - }, [guardOnJoinSession, isConnected, jamClient]); // Added jamClient to dependencies for stability + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isConnected, jamClient]); // guardOnJoinSession defined below, accessed via closure const guardOnJoinSession = async () => { // console.log("-DEBUG- JKSessionScreen: guardOnJoinSession")