mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-22 11:20:35 +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('//')) {
|
if (connectionUrl.startsWith('//')) {
|
||||||
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
const scheme = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
||||||
connectionUrl = `${scheme}://${connectionUrl}`
|
connectionUrl = `${scheme}:${connectionUrl}`
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connectionUrl = connectionUrl
|
this.connectionUrl = connectionUrl
|
||||||
|
|||||||
Reference in New Issue
Block a user