Fix a typo and an undefined variable case

This commit is contained in:
calzoneman 2014-04-08 18:06:37 -05:00
parent 5c9c096209
commit 324fa6c81a
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ function handleConnection(sock) {
Logger.syslog.log("Accepted socket from " + ip);
var user = new User(sock);
if (sock.handshake.user) {
if (sock.handshake && sock.handshake.user) {
user.name = sock.handshake.user.name;
user.global_rank = sock.handshake.user.global_rank;
user.loggedIn = true;