isNonEmptyArray => arrayLength

This commit is contained in:
djmaze 2021-07-21 21:34:17 +02:00
parent 1e49c1a6ac
commit 5590fd4860
20 changed files with 68 additions and 74 deletions

View file

@ -4,7 +4,7 @@ import { MessagePriority } from 'Common/EnumsUser';
import { i18n } from 'Common/Translator';
import { encodeHtml } from 'Common/Html';
import { isArray, isNonEmptyArray } from 'Common/Utils';
import { isArray, arrayLength } from 'Common/Utils';
import { serverRequestRaw } from 'Common/Links';
@ -229,7 +229,7 @@ export class MessageModel extends AbstractModel {
*/
fromDkimData() {
let result = ['none', ''];
if (isNonEmptyArray(this.from) && 1 === this.from.length && this.from[0] && this.from[0].dkimStatus) {
if (1 === arrayLength(this.from) && this.from[0] && this.from[0].dkimStatus) {
result = [this.from[0].dkimStatus, this.from[0].dkimValue || ''];
}