Merge pull request #125 from lastmirage/master

Support multiple packet data argument
This commit is contained in:
Metin Seylan 2018-03-23 11:59:54 +03:00 committed by GitHub
commit 99810e131a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 27 deletions

View file

@ -22,7 +22,7 @@ export default class{
this.Socket.onevent = (packet) => { this.Socket.onevent = (packet) => {
super_onevent.call(this.Socket, packet); super_onevent.call(this.Socket, packet);
Emitter.emit(packet.data[0], packet.data[1]); Emitter.emit.apply(Emitter, packet.data);
if (this.store) this.passToStore('SOCKET_' + packet.data[0], [...packet.data.slice(1)]) if (this.store) this.passToStore('SOCKET_' + packet.data[0], [...packet.data.slice(1)])
}; };