You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Desktop, Mobile: Fixes #5391: Fixed crash when a required master key does not exist
This commit is contained in:
@ -98,6 +98,14 @@ export function showMissingMasterKeyMessage(syncInfo: SyncInfo, notLoadedMasterK
|
||||
|
||||
for (let i = notLoadedMasterKeys.length - 1; i >= 0; i--) {
|
||||
const mk = syncInfo.masterKeys.find(mk => mk.id === notLoadedMasterKeys[i]);
|
||||
|
||||
// A "notLoadedMasterKey" is a key that either doesn't exist or for
|
||||
// which a password hasn't been set yet. For the purpose of this
|
||||
// function, we only want to notify the user about unset passwords.
|
||||
// Master keys that haven't been downloaded yet should normally be
|
||||
// downloaded at some point.
|
||||
// https://github.com/laurent22/joplin/issues/5391
|
||||
if (!mk) continue;
|
||||
if (!masterKeyEnabled(mk)) notLoadedMasterKeys.pop();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user