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

@ -1,5 +1,5 @@
import { MessageSetAction } from 'Common/EnumsUser';
import { pInt } from 'Common/Utils';
import { isNonEmptyArray, pInt } from 'Common/Utils';
let FOLDERS_CACHE = {},
FOLDERS_NAME_CACHE = {},
@ -255,7 +255,7 @@ export class MessageFlagsCache
* @param {Array} flags
*/
static storeByFolderAndUid(folder, uid, flags) {
if (Array.isNotEmpty(flags)) {
if (isNonEmptyArray(flags)) {
this.setFor(folder, uid, flags);
}
}
@ -269,7 +269,7 @@ export class MessageFlagsCache
let unread = 0;
const flags = this.getFor(folder, uid);
if (Array.isNotEmpty(flags)) {
if (isNonEmptyArray(flags)) {
if (flags[0]) {
unread = 1;
}