mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Skip crashing OpenPGP keys
This commit is contained in:
parent
03e2dda6c1
commit
295b3e4cfb
1 changed files with 3 additions and 1 deletions
|
@ -59,9 +59,11 @@ const
|
|||
let keys = [], key,
|
||||
armoredKeys = JSON.parse(storage.getItem(itemname)),
|
||||
i = arrayLength(armoredKeys);
|
||||
while (i--) {
|
||||
while (i--) try {
|
||||
key = await openpgp.readKey({armoredKey:armoredKeys[i]});
|
||||
key.err || keys.push(new OpenPgpKeyModel(armoredKeys[i], key));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
return keys;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue