Fix leaving gathers when data not defined

This commit is contained in:
Chris Blanchard 2015-09-17 13:56:34 +01:00
parent 8e434ac102
commit ab806776bd
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ module.exports = function (namespace) {
}
socket.on("gather:leave", function (data) {
if (data.gatherer) {
if (data && data.gatherer) {
// Remove gatherer defined by ID (admins only)
if (!socket._user.admin) return;
removeGatherer({ id: data.gatherer });