diff --git a/src/Main.js b/src/Main.js index 401a759..76580a5 100755 --- a/src/Main.js +++ b/src/Main.js @@ -55,15 +55,12 @@ export default { this.$options.sockets[key] = sockets[key] }) } - } else { - Object.seal(this.$options.sockets) - + } else if (sockets) { // if !hasProxy need addListener - if (sockets) { - Object.keys(sockets).forEach(key => { - Emitter.addListener(key, sockets[key], vm) - }) - } + Object.seal(this.$options.sockets) + Object.keys(sockets).forEach(key => { + Emitter.addListener(key, sockets[key], vm) + }) } }, beforeDestroy () {