mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +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
|
|
@ -1263,12 +1263,12 @@ class ComposePopupView extends AbstractViewNext {
|
|||
* @returns {?Object}
|
||||
*/
|
||||
getAttachmentById(id) {
|
||||
return _.find(this.attachments(), (item) => item && id === item.id);
|
||||
return this.attachments().find(item => item && id === item.id);
|
||||
}
|
||||
|
||||
cancelAttachmentHelper(id, oJua) {
|
||||
return () => {
|
||||
const attachment = _.find(this.attachments(), (item) => item && item.id === id);
|
||||
const attachment = this.attachments().find(item => item && item.id === id);
|
||||
if (attachment) {
|
||||
this.attachments.remove(attachment);
|
||||
delegateRunOnDestroy(attachment);
|
||||
|
|
@ -1516,7 +1516,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
removeLinkedAttachments() {
|
||||
const arrachment = _.find(this.attachments(), (item) => item && item.isLinked);
|
||||
const arrachment = this.attachments().find(item => item && item.isLinked);
|
||||
if (arrachment) {
|
||||
this.attachments.remove(arrachment);
|
||||
delegateRunOnDestroy(arrachment);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue