1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-10-31 00:07:48 +02:00

Desktop: Fix handling of disabled master keys when enabling E2EE

This commit is contained in:
Laurent Cozic
2021-09-09 19:24:52 +01:00
parent d33b99cffb
commit a2c6461af8

View File

@@ -162,8 +162,8 @@ export function showMissingMasterKeyMessage(syncInfo: SyncInfo, notLoadedMasterK
export function getDefaultMasterKey(): MasterKeyEntity {
let mk = getActiveMasterKey();
if (!mk || !mk.enabled) {
if (!mk || masterKeyEnabled(mk)) {
mk = MasterKey.latest();
}
return mk && mk.enabled ? mk : null;
return mk && masterKeyEnabled(mk) ? mk : null;
}