Array.isArray to isArray

Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
djmaze 2021-03-16 16:49:14 +01:00
parent 986b8f056b
commit 0b64083543
30 changed files with 82 additions and 69 deletions

View file

@ -8,7 +8,7 @@ import {
import { ComposeType } from 'Common/EnumsUser';
import { pInt } from 'Common/Utils';
import { isNonEmptyArray, pInt } from 'Common/Utils';
import { delegateRunOnDestroy, computedPaginatorHelper, showMessageComposer } from 'Common/UtilsUser';
import { Selector } from 'Common/Selector';
@ -164,7 +164,7 @@ class ContactsPopupView extends AbstractViewPopup {
bccEmails = null;
const aC = this.contactsCheckedOrSelected();
if (Array.isNotEmpty(aC)) {
if (isNonEmptyArray(aC)) {
aE = aC.map(oItem => {
if (oItem) {
const data = oItem.getNameAndEmailHelper(),
@ -181,7 +181,7 @@ class ContactsPopupView extends AbstractViewPopup {
aE = aE.filter(value => !!value);
}
if (Array.isNotEmpty(aE)) {
if (isNonEmptyArray(aE)) {
this.bBackToCompose = false;
hideScreenPopup(ContactsPopupView);
@ -461,7 +461,7 @@ class ContactsPopupView extends AbstractViewPopup {
list = [];
if (!iError && data && data.Result && data.Result.List) {
if (Array.isNotEmpty(data.Result.List)) {
if (isNonEmptyArray(data.Result.List)) {
data.Result.List.forEach(item => {
item = ContactModel.reviveFromJson(item);
item && list.push(item);

View file

@ -2,6 +2,7 @@ import ko from 'ko';
import { Scope, Notification } from 'Common/Enums';
import { getNotification, i18n } from 'Common/Translator';
import { isNonEmptyArray } from 'Common/Utils';
import Remote from 'Remote/Admin/Fetch';
@ -75,7 +76,7 @@ class PluginPopupView extends AbstractViewPopup {
this.readme(oPlugin.Readme);
const config = oPlugin.Config;
if (Array.isNotEmpty(config)) {
if (isNonEmptyArray(config)) {
this.configures(
config.map(item => ({
'value': ko.observable(item[0]),