2
0
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:
Dennis Reimann
2019-05-09 16:10:51 +02:00
committed by GitHub
parent 64c858f61d
commit 962958ae37
+1 -1
View File
@@ -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