fix: broken redirect for url with params when welcome page disable

This commit is contained in:
Shawn 2022-01-25 16:45:32 +00:00 committed by Hristo Terezov
parent 64322db56a
commit f5c0d7da5e
1 changed files with 3 additions and 5 deletions

View File

@ -80,11 +80,9 @@ function _getWebWelcomePageRoute(state) {
}
} else {
// Web: if the welcome page is disabled, go directly to a random room.
let href = window.location.href;
href.endsWith('/') || (href += '/');
route.href = href + generateRoomWithoutSeparator();
let url = new URL(window.location.href);
url.pathname += generateRoomWithoutSeparator();
route.href = url.href;
}
return Promise.resolve(route);