You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
All: Fixed handling of unloaded master key
This commit is contained in:
@@ -62,10 +62,10 @@ class DecryptionWorker {
|
||||
try {
|
||||
await ItemClass.decrypt(item);
|
||||
} catch (error) {
|
||||
if (error.code === 'missingMasterKey') {
|
||||
if (error.code === 'masterKeyNotLoaded') {
|
||||
excludedIds.push(item.id);
|
||||
this.dispatch({
|
||||
type: 'MASTERKEY_ADD_MISSING',
|
||||
type: 'MASTERKEY_ADD_NOT_LOADED',
|
||||
id: error.masterKeyId,
|
||||
});
|
||||
continue;
|
||||
|
||||
@@ -136,7 +136,7 @@ class EncryptionService {
|
||||
loadedMasterKey(id) {
|
||||
if (!this.loadedMasterKeys_[id]) {
|
||||
const error = new Error('Master key is not loaded: ' + id);
|
||||
error.code = 'missingMasterKey';
|
||||
error.code = 'masterKeyNotLoaded';
|
||||
error.masterKeyId = id;
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user