mirror of https://github.com/laurent22/joplin.git
Desktop: Fix handling of disabled master keys when enabling E2EE
parent
d33b99cffb
commit
a2c6461af8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue