mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-10 15:21:56 +00:00
Fix leaving gathers when data not defined
This commit is contained in:
parent
8e434ac102
commit
ab806776bd
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ module.exports = function (namespace) {
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.on("gather:leave", function (data) {
|
socket.on("gather:leave", function (data) {
|
||||||
if (data.gatherer) {
|
if (data && data.gatherer) {
|
||||||
// Remove gatherer defined by ID (admins only)
|
// Remove gatherer defined by ID (admins only)
|
||||||
if (!socket._user.admin) return;
|
if (!socket._user.admin) return;
|
||||||
removeGatherer({ id: data.gatherer });
|
removeGatherer({ id: data.gatherer });
|
||||||
|
|
Loading…
Reference in a new issue