Add multiple arguments support again

Suggested in issue #51 by huhk-sysu and partially fixed in PR #52.
This commit allow multiple arguments for message handlers without
the use of a store.
This commit is contained in:
numaru 2017-09-02 22:54:31 +02:00
parent d3c8d11f9e
commit 702d581b9e

View file

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