2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-05-17 04:19:38 +03:00

Update Main.js

when not hasProxy, the sockets need addListener
This commit is contained in:
Leo Deng
2018-11-02 10:33:19 +08:00
committed by GitHub
parent 38c49c13ae
commit 42a44ccd25
+7
View File
@@ -56,6 +56,13 @@ export default {
}
} else {
Object.seal(this.$options.sockets)
// if !hasProxy need addListener
if (sockets) {
Object.keys(sockets).forEach(key => {
Emitter.addListener(key, sockets[key], vm)
})
}
}
},
beforeDestroy () {