From 962958ae378bbd21f8b2368639ebd7cf66459985 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Thu, 9 May 2019 16:10:51 +0200 Subject: [PATCH] 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. --- src/Observer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Observer.js b/src/Observer.js index 48949a5..af84ec7 100755 --- a/src/Observer.js +++ b/src/Observer.js @@ -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