From 701ce2b87702aa185aed18dc1b33f706f734d553 Mon Sep 17 00:00:00 2001 From: SARVASVA KHARE <64934816+sarvasvaKhare@users.noreply.github.com> Date: Sat, 15 Aug 2020 20:27:20 +0530 Subject: [PATCH] made requested changes --- server/sockets/socket-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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