client: take care of trailing slash in wsUrl
This commit is contained in:
@@ -44,7 +44,7 @@ export default class MhdMapClient {
|
|||||||
this.startMap();
|
this.startMap();
|
||||||
|
|
||||||
const loc = document.location;
|
const loc = document.location;
|
||||||
this.wsUrl = 'ws' + (loc.protocol === 'https:' ? 's' : '')+ '://' + loc.host + loc.pathname + '/ws';
|
this.wsUrl = 'ws' + (loc.protocol === 'https:' ? 's' : '')+ '://' + loc.host + loc.pathname.replace(/\/$/, "") + '/ws';
|
||||||
|
|
||||||
await this.connectWs();
|
await this.connectWs();
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user