From 386b2a374b90638affc956b88a40c276207aa265 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 24 Jan 2013 13:56:06 -0500 Subject: refactor --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app.js') diff --git a/app.js b/app.js index 8b037b6..cab9f7a 100644 --- a/app.js +++ b/app.js @@ -204,7 +204,9 @@ io.sockets.on('connection', function (socket) { var now = Date.now(); updateTime(socket.user, now, socket.connected); socket.connected = now; - users[socket.user.id].active = false; + if (socket.user.id in users) { + users[socket.user.id].active = false; + } io.sockets.emit('blur', data); }); -- cgit v1.2.3-70-g09d2