Skip to content

Commit

Permalink
Fix connection URL when resolving the scheme
Browse files Browse the repository at this point in the history
In case the `connectionUrl` already starts with `//` the `//` in the concatination is redundant.

This might be related to #87.
  • Loading branch information
dennisreimann authored May 9, 2019
1 parent 64c858f commit 962958a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 962958a

Please sign in to comment.