From 8d03799ffe60f248e289ba51b885a1e22d43cb7d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 8 Sep 2020 16:51:55 +0100 Subject: [PATCH] Fix create-react-class regression. Can't call setState in c'tor --- src/components/structures/auth/Login.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 53769fb5a6..a20bf0dd0a 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -124,7 +124,11 @@ export default class LoginComponent extends React.Component { 'm.login.cas': () => this._renderSsoStep("cas"), 'm.login.sso': () => this._renderSsoStep("sso"), }; + } + // TODO: [REACT-WARNING] Replace with appropriate lifecycle event + // eslint-disable-next-line camelcase + UNSAFE_componentWillMount() { this._initLoginLogic(); }