mirror of https://github.com/vector-im/riot-web
Fix key backup status when missing device
We might not have the device in `sig.device`, so we have to check for it's existence first. This fixes the "Unable to load key backup status" message that is incorrectly triggering. Fixes https://github.com/vector-im/riot-web/issues/9442pull/21833/head
parent
86a6037a12
commit
5ee9de04c3
|
@ -221,7 +221,10 @@ export default class KeyBackupPanel extends React.PureComponent {
|
||||||
{sub}
|
{sub}
|
||||||
</span>;
|
</span>;
|
||||||
const device = sub => <span className="mx_KeyBackupPanel_deviceName">{deviceName}</span>;
|
const device = sub => <span className="mx_KeyBackupPanel_deviceName">{deviceName}</span>;
|
||||||
const fromThisDevice = sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key();
|
const fromThisDevice = (
|
||||||
|
sig.device &&
|
||||||
|
sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key()
|
||||||
|
);
|
||||||
let sigStatus;
|
let sigStatus;
|
||||||
if (!sig.device) {
|
if (!sig.device) {
|
||||||
sigStatus = _t(
|
sigStatus = _t(
|
||||||
|
|
Loading…
Reference in New Issue