From 82dd4802d729e584f1b05eeb68203f00083771a7 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Fri, 19 Aug 2011 21:35:31 +0100 Subject: [PATCH] fixed a API Bug --- node/handler/PadMessageHandler.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node/handler/PadMessageHandler.js b/node/handler/PadMessageHandler.js index c242aaa0..57f1e920 100644 --- a/node/handler/PadMessageHandler.js +++ b/node/handler/PadMessageHandler.js @@ -460,6 +460,13 @@ function handleUserChanges(client, message) exports.updatePadClients = function(pad, callback) { + //skip this step if noone is on this pad + if(!pad2sessions[pad.id]) + { + callback(); + return; + } + //go trough all sessions on this pad async.forEach(pad2sessions[pad.id], function(session, callback) {