Fix handling of remote maps

This commit is contained in:
Thomas Basler 2021-01-20 21:00:59 +01:00
parent 84d9e47c73
commit e8127fc4ae
1 changed files with 2 additions and 3 deletions

View File

@ -48,11 +48,10 @@ class ConnectionManager {
}
let roomId: string
if (connexionType === GameConnexionTypes.empty) {
let defaultMapUrl = window.location.host.replace('play.', 'maps.') + URL_ROOM_STARTED;
roomId = urlManager.editUrlForRoom(URL_ROOM_STARTED, null, null);
if (URL_ROOM_STARTED.startsWith('http://') || URL_ROOM_STARTED.startsWith('https://')) {
defaultMapUrl = URL_ROOM_STARTED.replace('http://', '').replace('https://', '');
roomId = '/_/global/' + URL_ROOM_STARTED.replace('http://', '').replace('https://', '');
}
roomId = urlManager.editUrlForRoom(defaultMapUrl, null, null);
} else {
roomId = window.location.pathname + window.location.hash;
}