Don't attempt to send auth if socket is not open
All checks were successful
Build / build (pull_request) Successful in 50s

This commit is contained in:
Sainan 2025-06-21 18:17:26 +02:00
parent 9827da1b86
commit befbe820b4

View File

@ -12,7 +12,7 @@ let auth_pending = false,
did_initial_auth = false, did_initial_auth = false,
ws_is_open = false; ws_is_open = false;
const sendAuth = isRegister => { const sendAuth = isRegister => {
if (localStorage.getItem("email") && localStorage.getItem("password")) { if (ws_is_open && localStorage.getItem("email") && localStorage.getItem("password")) {
auth_pending = true; auth_pending = true;
window.ws.send( window.ws.send(
JSON.stringify({ JSON.stringify({