client: take care of trailing slash in wsUrl

This commit is contained in:
2022-09-13 20:57:06 +02:00
parent fdbe42144a
commit a43bdda953

View File

@@ -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(() => {