Fix undefined dereference in rank callback
This commit is contained in:
parent
67b1c97d89
commit
878b30bdb2
|
@ -79,7 +79,9 @@ PollModule.prototype.onUserPostJoin = function (user) {
|
||||||
this.addUserToPollRoom(user);
|
this.addUserToPollRoom(user);
|
||||||
const self = this;
|
const self = this;
|
||||||
user.on("effectiveRankChange", () => {
|
user.on("effectiveRankChange", () => {
|
||||||
|
if (self.channel && !self.channel.dead) {
|
||||||
self.addUserToPollRoom(user);
|
self.addUserToPollRoom(user);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue