From 5ee9de04c37aeac7d5d67842a7eea0f0e2ef2236 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 12 Apr 2019 16:23:54 +0100 Subject: [PATCH] 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/9442 --- src/components/views/settings/KeyBackupPanel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 7667e11d46..42ebf1c89d 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -221,7 +221,10 @@ export default class KeyBackupPanel extends React.PureComponent { {sub} ; const device = sub => {deviceName}; - const fromThisDevice = sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key(); + const fromThisDevice = ( + sig.device && + sig.device.getFingerprint() === MatrixClientPeg.get().getDeviceEd25519Key() + ); let sigStatus; if (!sig.device) { sigStatus = _t(