mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Underscore.js _.find() to native Array.find()
This commit is contained in:
parent
2404f6466d
commit
9c0072d626
19 changed files with 55 additions and 79 deletions
|
|
@ -56,7 +56,7 @@ class GeneralUserSettings {
|
|||
|
||||
this.identityMain = ko.computed(() => {
|
||||
const list = this.identities();
|
||||
return isArray(list) ? _.find(list, (item) => item && '' === item.id()) : null;
|
||||
return isArray(list) ? list.find(item => item && '' === item.id()) : null;
|
||||
});
|
||||
|
||||
this.identityMainDesc = ko.computed(() => {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class OpenPgpUserSettings {
|
|||
this.openPgpKeyForDeletion(null);
|
||||
|
||||
if (openPgpKeyToRemove && PgpStore.openpgpKeyring) {
|
||||
const findedItem = _.find(PgpStore.openpgpkeys(), (key) => openPgpKeyToRemove === key);
|
||||
const findedItem = PgpStore.openpgpkeys().find(key => openPgpKeyToRemove === key);
|
||||
if (findedItem) {
|
||||
PgpStore.openpgpkeys.remove(findedItem);
|
||||
delegateRunOnDestroy(findedItem);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue