mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-21 02:20:34 +03:00
fix: add listeners to custom socket functions on the created hook instead of beforeCreate hook in the mixin lifecycle
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -12,7 +12,7 @@ export default {
|
|||||||
Vue.prototype.$socket = observer.Socket;
|
Vue.prototype.$socket = observer.Socket;
|
||||||
|
|
||||||
Vue.mixin({
|
Vue.mixin({
|
||||||
beforeCreate(){
|
created(){
|
||||||
let sockets = this.$options['sockets']
|
let sockets = this.$options['sockets']
|
||||||
|
|
||||||
this.$options.sockets = new Proxy({}, {
|
this.$options.sockets = new Proxy({}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user