Merge pull request #62 from H4CK3R-01/fix_error

Show error message if room is full
This commit is contained in:
Florian Kaiser
2021-07-12 10:28:43 +02:00
committed by GitHub

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);
document.getElementById('login').style.display = 'flex';
document.getElementById('game').style.display = 'none';
document.getElementById('chat').style.display = 'none';
document.getElementById('error').innerText = data;
});
socket.on('new message', function (data) {