From 267c32143b4f619883640fe6d14e3e3533b15c04 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 9 Sep 2021 18:42:00 +0100 Subject: [PATCH] Desktop: Fix handling of disabled master keys when enabling E2EE --- packages/app-desktop/gui/EncryptionConfigScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-desktop/gui/EncryptionConfigScreen.tsx b/packages/app-desktop/gui/EncryptionConfigScreen.tsx index 2488c3bcd..54b278077 100644 --- a/packages/app-desktop/gui/EncryptionConfigScreen.tsx +++ b/packages/app-desktop/gui/EncryptionConfigScreen.tsx @@ -274,7 +274,7 @@ class EncryptionConfigScreenComponent extends React.Component { // If the user has explicitly disabled the master key, we generate a // new one. Needed for one the password has been forgotten. - if (!masterKey.enabled) masterKey = null; + if (masterKey && !masterKey.enabled) masterKey = null; let answer = null; if (isEnabled) {