mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +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
|
|
@ -1,4 +1,3 @@
|
|||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
|
||||
import { FolderType } from 'Common/Enums';
|
||||
|
|
@ -64,9 +63,8 @@ class FolderModel extends AbstractModel {
|
|||
|
||||
this.hasSubScribedSubfolders = ko.computed(
|
||||
() =>
|
||||
!!_.find(
|
||||
this.subFolders(),
|
||||
(oFolder) => (oFolder.subScribed() || oFolder.hasSubScribedSubfolders()) && !oFolder.isSystemFolder()
|
||||
!!this.subFolders().find(
|
||||
oFolder => (oFolder.subScribed() || oFolder.hasSubScribedSubfolders()) && !oFolder.isSystemFolder()
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -230,9 +228,8 @@ class FolderModel extends AbstractModel {
|
|||
|
||||
this.hasSubScribedUnreadMessagesSubfolders = ko.computed(
|
||||
() =>
|
||||
!!_.find(
|
||||
this.subFolders(),
|
||||
(folder) => folder.hasUnreadMessages() || folder.hasSubScribedUnreadMessagesSubfolders()
|
||||
!!this.subFolders().find(
|
||||
folder => folder.hasUnreadMessages() || folder.hasSubScribedUnreadMessagesSubfolders()
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue