mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +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
|
|
@ -59,7 +59,7 @@ class Selector {
|
|||
this.itemSelectedThrottle = _.debounce(this.itemSelected.bind(this), 300);
|
||||
|
||||
this.listChecked.subscribe((items) => {
|
||||
if (0 < items.length) {
|
||||
if (items.length) {
|
||||
if (null === this.selectedItem()) {
|
||||
if (this.selectedItem.valueHasMutated) {
|
||||
this.selectedItem.valueHasMutated();
|
||||
|
|
@ -177,7 +177,7 @@ class Selector {
|
|||
if (!isChecked && !isSelected && this.autoSelect()) {
|
||||
if (this.focusedItem()) {
|
||||
this.selectedItem(this.focusedItem());
|
||||
} else if (0 < aItems.length) {
|
||||
} else if (aItems.length) {
|
||||
if (null !== isNextFocused) {
|
||||
getNext = false;
|
||||
isNextFocused = aCache.find(sUid => {
|
||||
|
|
@ -201,7 +201,7 @@ class Selector {
|
|||
|
||||
if (
|
||||
(0 !== this.iSelectNextHelper || 0 !== this.iFocusedNextHelper) &&
|
||||
0 < aItems.length &&
|
||||
aItems.length &&
|
||||
!this.focusedItem()
|
||||
) {
|
||||
temp = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue