catch server error when id or obj is not set
This commit is contained in:
parent
b0a9447cdb
commit
9ab207faa0
@ -122,7 +122,9 @@ io.on('connection', function (socket) {
|
||||
var whiteboardId = null;
|
||||
|
||||
socket.on('disconnect', function () {
|
||||
delete smallestScreenResolutions[whiteboardId][socket.id];
|
||||
if(smallestScreenResolutions && smallestScreenResolutions[whiteboardId] && socket && socket.id) {
|
||||
delete smallestScreenResolutions[whiteboardId][socket.id];
|
||||
}
|
||||
socket.broadcast.emit('refreshUserBadges', null); //Removes old user Badges
|
||||
sendSmallestScreenResolution();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user