Merge branch 'develop' of github.com:vector-im/element-web into superkenvery/webaudioapi

This commit is contained in:
许煜恒 2023-06-26 23:10:51 +08:00
commit 85dbaaa5ff
16 changed files with 597 additions and 304 deletions

View file

@ -107,7 +107,8 @@ export async function loadApp(fragParams: {}): Promise<ReactElement> {
const ssoRedirects = parseSsoRedirectOptions(config);
let autoRedirect = ssoRedirects.immediate === true;
// XXX: This path matching is a bit brittle, but better to do it early instead of in the app code.
const isWelcomeOrLanding = window.location.hash === "#/welcome" || window.location.hash === "#";
const isWelcomeOrLanding =
window.location.hash === "#/welcome" || window.location.hash === "#" || window.location.hash === "";
if (!autoRedirect && ssoRedirects.on_welcome_page && isWelcomeOrLanding) {
autoRedirect = true;
}

View file

@ -167,7 +167,7 @@ export default class WebPlatform extends VectorBasePlatform {
logger.error("Failed to poll for update", err);
return {
status: UpdateCheckStatus.Error,
detail: err.message || err.status ? err.status.toString() : "Unknown Error",
detail: err.message || (err.status ? err.status.toString() : "Unknown Error"),
};
},
);