diff --git a/server/sockets/socket-server.js b/server/sockets/socket-server.js index 6a80247..4459451 100644 --- a/server/sockets/socket-server.js +++ b/server/sockets/socket-server.js @@ -22,7 +22,7 @@ io.on('connection', (socket) => { if (error) throw error; // loop for checking username of every other player with given username for (var i = 0; i < clients.length; i++) { - var user = io.sockets.sockets[clients[i]]; // saving socket into user + const user = io.sockets.sockets[clients[i]]; // saving socket into user if (user.username == data.username) { // if equal therfore username taken usernameTaken = 1; // setting var to 1