Skip to content

Commit

Permalink
made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvasvaKhare authored Aug 15, 2020
1 parent 6f720da commit 701ce2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/sockets/socket-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 701ce2b

Please sign in to comment.