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

Fix NPE in RoomRecoveryReminder #2508

Merged
merged 1 commit into from
Jan 25, 2019
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
5 changes: 2 additions & 3 deletions src/components/views/rooms/RoomRecoveryReminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class RoomRecoveryReminder extends React.PureComponent {

let unverifiedDevice;
for (const sig of backupSigStatus.sigs) {
if (!sig.device.isVerified()) {
if (sig.device && !sig.device.isVerified()) {
unverifiedDevice = sig.device;
break;
}
Expand Down Expand Up @@ -133,12 +133,11 @@ export default class RoomRecoveryReminder extends React.PureComponent {
const AccessibleButton = sdk.getComponent("views.elements.AccessibleButton");

let body;
let primaryCaption;
let primaryCaption = _t("Set up");
if (this.state.error) {
body = <div className="error">
{_t("Unable to load key backup status")}
</div>;
primaryCaption = _t("Set up");
} else if (this.state.unverifiedDevice) {
// A key backup exists for this account, but the creating device is not
// verified.
Expand Down