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 <noreply@anthropic.com>
This commit is contained in:
Nuwan 2026-03-05 22:40:29 +05:30
parent a839cd9d9d
commit 98163c2acb
1 changed files with 2 additions and 1 deletions

View File

@ -405,7 +405,8 @@ const JKSessionScreen = () => {
// console.debug("-DEBUG- JKSessionScreen: isConnected changed to true"); // console.debug("-DEBUG- JKSessionScreen: isConnected changed to true");
guardOnJoinSession(); 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 () => { const guardOnJoinSession = async () => {
// console.log("-DEBUG- JKSessionScreen: guardOnJoinSession") // console.log("-DEBUG- JKSessionScreen: guardOnJoinSession")