Merge pull request #66 from H4CK3R-01/fix_duplicate_user

User with the same name as another user is rejected
This commit is contained in:
Fabian Thomé
2021-07-12 13:45:24 +02:00
committed by GitHub
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';