diff --git a/static/sfu.js b/static/sfu.js index 767d294..33ec084 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -1437,6 +1437,11 @@ function handleInput() { me = false; } + if(!serverConnection || !serverConnection.socket) { + displayError("Not connected."); + return; + } + let username = getUsername(); if(!username) { displayError("Sorry, you're anonymous, you cannot chat");