__Problem__: `window.jamClient = jamClient;` was polluting the global scope, preventing garbage collection of the jamClient object and creating potential memory leaks.

__Solution__: Removed the global assignment entirely since:

- The `jamClient` is already available through `JamServerContext`
- No usage of `window.jamClient` was found in the codebase
- The comment mentioned "iframe access" but this can be handled through proper React patterns if needed
This commit is contained in:
Nuwan 2026-01-03 10:25:25 +05:30
parent b193fb299a
commit d6ec0a3406
1 changed files with 0 additions and 3 deletions

View File

@ -155,9 +155,6 @@ const JKSessionScreen = () => {
if (!isConnected || !jamClient) return;
console.debug("JKSessionScreen: -DEBUG- isConnected changed to true");
// Make jamClient available globally for iframe access
window.jamClient = jamClient;
guardOnJoinSession();
}, [isConnected, jamClient]); // Added jamClient to dependencies for stability