mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
includes bug fix from other PR re: callback
This commit is contained in:
parent
64584724b6
commit
f574194efd
2 changed files with 7 additions and 3 deletions
2
dist/vue-socketio.js
vendored
2
dist/vue-socketio.js
vendored
File diff suppressed because one or more lines are too long
|
@ -19,8 +19,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$vueSocketIo.emitter.addListener(event, callback, this);
|
this.sockets.subscribe = (event, callback) => {
|
||||||
this.$vueSocketIo.emitter.removeListener(event, this);
|
this.$vueSocketIo.emitter.addListener(event, callback, this);
|
||||||
|
};
|
||||||
|
this.sockets.unsubscribe = (event) => {
|
||||||
|
this.$vueSocketIo.emitter.removeListener(event, this);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue