mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Cleanup array.length checks and for() to forEach()
This commit is contained in:
parent
db5751cd00
commit
82bed1ed80
24 changed files with 135 additions and 169 deletions
|
|
@ -58,7 +58,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
super();
|
||||
|
||||
const fFastClearEmptyListHelper = (list) => {
|
||||
if (list && 0 < list.length) {
|
||||
if (list && list.length) {
|
||||
this.viewProperties.removeAll(list);
|
||||
delegateRunOnDestroy(list);
|
||||
}
|
||||
|
|
@ -456,7 +456,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
let currentContact = this.currentContact(),
|
||||
count = this.contacts().length;
|
||||
|
||||
if (0 < contacts.length) {
|
||||
if (contacts.length) {
|
||||
contacts.forEach(contact => {
|
||||
if (currentContact && currentContact.idContact === contact.idContact) {
|
||||
currentContact = null;
|
||||
|
|
@ -481,7 +481,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
deleteSelectedContacts() {
|
||||
if (0 < this.contactsCheckedOrSelected().length) {
|
||||
if (this.contactsCheckedOrSelected().length) {
|
||||
Remote.contactsDelete(this.deleteResponse.bind(this), this.contactsCheckedOrSelectedUids());
|
||||
|
||||
this.removeCheckedOrSelectedContactsFromList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue