瀏覽代碼

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

master
Shawn 3 年之前
父節點
當前提交
f5c0d7da5e
共有 1 個檔案被更改,包括 3 行新增5 行删除
  1. 3
    5
      react/features/app/getRouteToRender.web.js

+ 3
- 5
react/features/app/getRouteToRender.web.js 查看文件

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

Loading…
取消
儲存