Desktop: Fix handling of disabled master keys when enabling E2EE

pull/5448/head
Laurent Cozic 2021-09-09 18:42:00 +01:00
parent 9260b2a9ab
commit 267c32143b
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ class EncryptionConfigScreenComponent extends React.Component<Props> {
// 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) {