mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-23 17:40:34 +03:00
Update Main.js
when not hasProxy, the sockets need addListener
This commit is contained in:
@@ -56,6 +56,13 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Object.seal(this.$options.sockets)
|
Object.seal(this.$options.sockets)
|
||||||
|
|
||||||
|
// if !hasProxy need addListener
|
||||||
|
if (sockets) {
|
||||||
|
Object.keys(sockets).forEach(key => {
|
||||||
|
Emitter.addListener(key, sockets[key], vm)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
|
|||||||
Reference in New Issue
Block a user