mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-18 20:00:35 +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:
+2
-5
@@ -13,11 +13,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (opts.connectManually) {
|
if (opts.connectManually) {
|
||||||
Vue.prototype.$connect = (connectionAlternative) => {
|
Vue.prototype.$connect = (connectionUrl = connection, connectionOpts = opts) => {
|
||||||
if (connectionAlternative) {
|
observer = new Observer(connectionUrl, connectionOpts)
|
||||||
connection = connectionAlternative
|
|
||||||
}
|
|
||||||
observer = new Observer(connection, opts)
|
|
||||||
Vue.prototype.$socket = observer.WebSocket
|
Vue.prototype.$socket = observer.WebSocket
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user