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

Connection URL/Opts update with default values

Added the `connectionUrl` & `connectionOpts` parameters with default values, to the manual `connect` function
This commit is contained in:
Philip Marais
2018-09-26 11:28:34 +02:00
committed by GitHub
parent 3ea1a54c77
commit 94c131ecfe
+2 -5
View File
@@ -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
}