User with the same name as another user is rejected

This commit is contained in:
H4CK3R-01
2021-07-12 13:41:52 +02:00
committed by H4CK3R-01
parent 2ad4681082
commit f14a408c87
2 changed files with 15 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ document.getElementById('ok').addEventListener('click', function () {
});
socket.on('error', function (data) {
if (data === 'Game started already or room has too many members') {
if (data === 'Game started already or room has too many members' || data === 'Username already exists') {
document.getElementById('login').style.display = 'flex';
document.getElementById('game').style.display = 'none';
document.getElementById('chat').style.display = 'none';