Improve typing (#7349)

This commit is contained in:
Michael Telatynski 2021-12-14 15:34:54 +00:00 committed by GitHub
parent b2548f05a8
commit 7033f8696a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 11 deletions

View file

@ -454,7 +454,7 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
let errorText: ReactNode = _t("There was a problem communicating with the homeserver, " +
"please try again later.") + (errCode ? " (" + errCode + ")" : "");
if (err.cors === 'rejected') {
if (err["cors"] === 'rejected') { // browser-request specific error field
if (window.location.protocol === 'https:' &&
(this.props.serverConfig.hsUrl.startsWith("http:") ||
!this.props.serverConfig.hsUrl.startsWith("http"))