mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Array.isArray to isArray
Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
parent
986b8f056b
commit
0b64083543
30 changed files with 82 additions and 69 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue