You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Fix register exploding if the server is down or we just don't have flows
This commit is contained in:
@@ -340,8 +340,8 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
|
|||||||
};
|
};
|
||||||
|
|
||||||
onTryRegisterClick = ev => {
|
onTryRegisterClick = ev => {
|
||||||
const hasPasswordFlow = this.state.flows.find(flow => flow.type === "m.login.password");
|
const hasPasswordFlow = this.state.flows?.find(flow => flow.type === "m.login.password");
|
||||||
const ssoFlow = this.state.flows.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas");
|
const ssoFlow = this.state.flows?.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas");
|
||||||
// If has no password flow but an SSO flow guess that the user wants to register with SSO.
|
// If has no password flow but an SSO flow guess that the user wants to register with SSO.
|
||||||
// TODO: instead hide the Register button if registration is disabled by checking with the server,
|
// TODO: instead hide the Register button if registration is disabled by checking with the server,
|
||||||
// has no specific errCode currently and uses M_FORBIDDEN.
|
// has no specific errCode currently and uses M_FORBIDDEN.
|
||||||
|
|||||||
Reference in New Issue
Block a user