Fix undefined dereference in rank callback

This commit is contained in:
Calvin Montgomery 2018-07-25 21:27:28 -07:00
parent 67b1c97d89
commit 878b30bdb2
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,9 @@ PollModule.prototype.onUserPostJoin = function (user) {
this.addUserToPollRoom(user);
const self = this;
user.on("effectiveRankChange", () => {
if (self.channel && !self.channel.dead) {
self.addUserToPollRoom(user);
}
});
};