From 702d581b9e799158a7dfab0b44270a90305ebcef Mon Sep 17 00:00:00 2001 From: numaru Date: Sat, 2 Sep 2017 22:54:31 +0200 Subject: [PATCH] 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. --- src/Observer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Observer.js b/src/Observer.js index e1afdcc..5d1deca 100755 --- a/src/Observer.js +++ b/src/Observer.js @@ -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)]) };