mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-09 16:12:25 +03:00
Fix connection URL when resolving the scheme
In case the `connectionUrl` already starts with `//` the `//` in the concatination is redundant. This might be related to #87.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ export default class {
|
||||
|
||||
if (connectionUrl.startsWith('//')) {
|
||||
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||
connectionUrl = `${scheme}://${connectionUrl}`
|
||||
connectionUrl = `${scheme}:${connectionUrl}`
|
||||
}
|
||||
|
||||
this.connectionUrl = connectionUrl
|
||||
|
||||
Reference in New Issue
Block a user