mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +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
|
|
@ -119,7 +119,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
emails = this.viewPropertiesEmails(),
|
||||
fFilter = (property) => '' !== trim(property.value());
|
||||
|
||||
return !!(_.find(names, fFilter) || _.find(emails, fFilter));
|
||||
return !!(names.find(fFilter) || emails.find(fFilter));
|
||||
});
|
||||
|
||||
this.viewPropertiesPhones = ko.computed(() =>
|
||||
|
|
@ -381,7 +381,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
addNewOrFocusProperty(type, typeStr) {
|
||||
const item = _.find(this.viewProperties(), (prop) => type === prop.type());
|
||||
const item = this.viewProperties().find(prop => type === prop.type());
|
||||
if (item) {
|
||||
item.focused(true);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue