mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
Fix for client observer callback function
This commit is contained in:
parent
57887ea0a1
commit
6057f46014
2 changed files with 4 additions and 4 deletions
2
dist/build.js
vendored
2
dist/build.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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)])
|
||||
};
|
||||
|
@ -31,8 +31,8 @@ export default class{
|
|||
|
||||
["connect", "error", "disconnect", "reconnect", "reconnect_attempt", "reconnecting", "reconnect_error", "reconnect_failed", "connect_error", "connect_timeout", "connecting", "ping", "pong"]
|
||||
.forEach((value) => {
|
||||
_this.Socket.on(value, (data) => {
|
||||
Emitter.emit(value, data);
|
||||
_this.Socket.on(value, (data, ...args) => {
|
||||
Emitter.emit(value, data, ...args);
|
||||
if(_this.store) _this.passToStore('SOCKET_'+value, data)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue