Show error message if room is full

This commit is contained in:
H4CK3R-01 2021-07-12 10:24:50 +02:00 committed by H4CK3R-01
parent 6c14f8619a
commit cf442cd629

View File

@ -47,13 +47,10 @@ document.getElementById('ok').addEventListener('click', function () {
});
socket.on('error', function (data) {
if (data === 'Game started already or room has two many members') {
document.getElementById('login').style.display = 'flex';
document.getElementById('game').style.display = 'none';
document.getElementById('chat').style.display = 'none';
document.getElementById('error').innerText = data;
}
console.log(data);
});
socket.on('new message', function (data) {