From f5c0d7da5eaee294ba57a66507a9929b48061c0b Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 25 Jan 2022 16:45:32 +0000 Subject: [PATCH] fix: broken redirect for url with params when welcome page disable --- react/features/app/getRouteToRender.web.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/react/features/app/getRouteToRender.web.js b/react/features/app/getRouteToRender.web.js index 0a390db19..20e051a26 100644 --- a/react/features/app/getRouteToRender.web.js +++ b/react/features/app/getRouteToRender.web.js @@ -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);