mirror of https://github.com/vector-im/riot-web
Merge pull request #2508 from matrix-org/dbkr/fix_roomrecoveryreminder_npe
Fix NPE in RoomRecoveryReminderpull/21833/head
commit
86e9417a19
|
@ -62,7 +62,7 @@ export default class RoomRecoveryReminder extends React.PureComponent {
|
||||||
|
|
||||||
let unverifiedDevice;
|
let unverifiedDevice;
|
||||||
for (const sig of backupSigStatus.sigs) {
|
for (const sig of backupSigStatus.sigs) {
|
||||||
if (!sig.device.isVerified()) {
|
if (sig.device && !sig.device.isVerified()) {
|
||||||
unverifiedDevice = sig.device;
|
unverifiedDevice = sig.device;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -133,12 +133,11 @@ export default class RoomRecoveryReminder extends React.PureComponent {
|
||||||
const AccessibleButton = sdk.getComponent("views.elements.AccessibleButton");
|
const AccessibleButton = sdk.getComponent("views.elements.AccessibleButton");
|
||||||
|
|
||||||
let body;
|
let body;
|
||||||
let primaryCaption;
|
let primaryCaption = _t("Set up");
|
||||||
if (this.state.error) {
|
if (this.state.error) {
|
||||||
body = <div className="error">
|
body = <div className="error">
|
||||||
{_t("Unable to load key backup status")}
|
{_t("Unable to load key backup status")}
|
||||||
</div>;
|
</div>;
|
||||||
primaryCaption = _t("Set up");
|
|
||||||
} else if (this.state.unverifiedDevice) {
|
} else if (this.state.unverifiedDevice) {
|
||||||
// A key backup exists for this account, but the creating device is not
|
// A key backup exists for this account, but the creating device is not
|
||||||
// verified.
|
// verified.
|
||||||
|
|
Loading…
Reference in New Issue