Skip to content

Commit 94c131e

Browse files
authored
Connection URL/Opts update with default values
Added the `connectionUrl` & `connectionOpts` parameters with default values, to the manual `connect` function
1 parent 3ea1a54 commit 94c131e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Main.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ export default {
1313
}
1414

1515
if (opts.connectManually) {
16-
Vue.prototype.$connect = (connectionAlternative) => {
17-
if (connectionAlternative) {
18-
connection = connectionAlternative
19-
}
20-
observer = new Observer(connection, opts)
16+
Vue.prototype.$connect = (connectionUrl = connection, connectionOpts = opts) => {
17+
observer = new Observer(connectionUrl, connectionOpts)
2118
Vue.prototype.$socket = observer.WebSocket
2219
}
2320

0 commit comments

Comments
 (0)