mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
fix tests
This commit is contained in:
parent
646c9f1a83
commit
85f2f46d13
@ -110,6 +110,18 @@ export default class InteractiveAuthComponent extends React.Component {
|
||||
requestEmailToken: this._requestEmailToken,
|
||||
});
|
||||
|
||||
this._intervalId = null;
|
||||
if (this.props.poll) {
|
||||
this._intervalId = setInterval(() => {
|
||||
this._authLogic.poll();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
this._stageComponent = createRef();
|
||||
}
|
||||
|
||||
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
|
||||
UNSAFE_componentWillMount() { // eslint-disable-line camelcase
|
||||
this._authLogic.attemptAuth().then((result) => {
|
||||
const extra = {
|
||||
emailSid: this._authLogic.getEmailSid(),
|
||||
@ -128,15 +140,6 @@ export default class InteractiveAuthComponent extends React.Component {
|
||||
errorText: msg,
|
||||
});
|
||||
});
|
||||
|
||||
this._intervalId = null;
|
||||
if (this.props.poll) {
|
||||
this._intervalId = setInterval(() => {
|
||||
this._authLogic.poll();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
this._stageComponent = createRef();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
Loading…
Reference in New Issue
Block a user