馃殤 Fix crash on connection close

parent 9d16a13a
......@@ -199,8 +199,8 @@ class BanchoClient extends EventEmitter {
onClose(err) {
// Every currently joined channel should be considered left.
for(const channel of Object.values(this.channels))
if(channel[1].joined)
IrcCommands.PART.emit(this, this.getSelf(), channel[1]);
if(channel.joined)
IrcCommands.PART.emit(this, this.getSelf(), channel);
if(this.connectState == ConnectStates.Disconnected)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment