1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Desktop: Fix handling of disabled master keys when enabling E2EE

This commit is contained in:
Laurent Cozic 2021-09-09 18:42:00 +01:00
parent 9260b2a9ab
commit 267c32143b

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) {