Reorganise disabledEvents stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-09 14:41:57 -04:00
parent 7b571f9729
commit dabe51fc8d
3 changed files with 9 additions and 13 deletions

View File

@@ -84,9 +84,7 @@ class WebSocketPacketManager {
this.setSequence(packet.s);
if (this.ws.client.options.disabledEvents[packet.t] !== undefined) {
return false;
}
if (this.ws.disabledEvents[packet.t] !== undefined) return false;
if (this.ws.status !== Constants.Status.READY) {
if (BeforeReadyWhitelist.indexOf(packet.t) === -1) {