mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
Fix: propagate event to Socket
This commit is contained in:
parent
d44a480584
commit
b0993481f7
1 changed files with 3 additions and 0 deletions
|
@ -18,7 +18,10 @@ export default class{
|
||||||
}
|
}
|
||||||
|
|
||||||
onEvent(){
|
onEvent(){
|
||||||
|
var super_onevent = this.Socket.onevent;
|
||||||
this.Socket.onevent = (packet) => {
|
this.Socket.onevent = (packet) => {
|
||||||
|
super_onevent.call(this.Socket, packet);
|
||||||
|
|
||||||
Emitter.emit(packet.data[0], packet.data[1]);
|
Emitter.emit(packet.data[0], packet.data[1]);
|
||||||
|
|
||||||
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)])
|
||||||
|
|
Loading…
Add table
Reference in a new issue