Define .sockets object

This commit is contained in:
Joe Ksiazek 2018-03-15 19:32:23 -04:00
parent 9d7c791033
commit ea4c3fd081

View file

@ -15,6 +15,10 @@ export default {
created(){
let sockets = this.$options['sockets']
if (!this.$options.sockets) {
this.$options.sockets = {};
}
// define on and off as non-enumerable properties
Object.defineProperty(this.$options.sockets, 'on', {
value: (label, callback) => {