From 94c131ecfef538bb2efb5a94cbcb76dcc41aa606 Mon Sep 17 00:00:00 2001 From: Philip Marais Date: Wed, 26 Sep 2018 11:28:34 +0200 Subject: [PATCH] Connection URL/Opts update with default values Added the `connectionUrl` & `connectionOpts` parameters with default values, to the manual `connect` function --- src/Main.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Main.js b/src/Main.js index 11812d2..dffa89b 100755 --- a/src/Main.js +++ b/src/Main.js @@ -13,11 +13,8 @@ export default { } if (opts.connectManually) { - Vue.prototype.$connect = (connectionAlternative) => { - if (connectionAlternative) { - connection = connectionAlternative - } - observer = new Observer(connection, opts) + Vue.prototype.$connect = (connectionUrl = connection, connectionOpts = opts) => { + observer = new Observer(connectionUrl, connectionOpts) Vue.prototype.$socket = observer.WebSocket }