From 0494c1388a3680faf958fb59dfc5581f0fde2c04 Mon Sep 17 00:00:00 2001 From: Will McNaughton Date: Tue, 3 Apr 2018 09:54:24 -0500 Subject: [PATCH] Convert $connect and $disconnect to arrow functions --- src/Main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.js b/src/Main.js index 5bec84c..aadd696 100755 --- a/src/Main.js +++ b/src/Main.js @@ -9,12 +9,12 @@ export default { let observer = null if (opts.connectManually) { - Vue.prototype.$connect = function () { + Vue.prototype.$connect = () => { observer = new Observer(connection, opts) Vue.prototype.$socket = observer.WebSocket } - Vue.prototype.$disconnect = function () { + Vue.prototype.$disconnect = () => { if (observer && observer.reconnection) { observer.reconnection = false } if (Vue.prototype.$socket) { Vue.prototype.$socket.close()