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:
+2
-5
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user