Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix soft crash on soft logout page #5539

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/structures/auth/SoftLogout.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ export default class SoftLogout extends React.Component {

this._initLogin();

MatrixClientPeg.get().countSessionsNeedingBackup().then(remaining => {
this.setState({keyBackupNeeded: remaining > 0});
});
const cli = MatrixClientPeg.get();
if (cli.isCryptoEnabled()) {
cli.countSessionsNeedingBackup().then(remaining => {
this.setState({ keyBackupNeeded: remaining > 0 });
});
}
}

onClearAll = () => {
Expand Down