mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
isNonEmptyArray => arrayLength
This commit is contained in:
parent
1e49c1a6ac
commit
5590fd4860
20 changed files with 68 additions and 74 deletions
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { FilterModel } from 'Model/Filter';
|
||||
import { isNonEmptyArray, pString } from 'Common/Utils';
|
||||
import { arrayLength, pString } from 'Common/Utils';
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
|
||||
|
|
@ -327,7 +327,7 @@ export class SieveScriptModel extends AbstractModel
|
|||
if (script) {
|
||||
if (script.allowFilters()) {
|
||||
script.filters(
|
||||
isNonEmptyArray(json.filters)
|
||||
arrayLength(json.filters)
|
||||
? json.filters.map(aData => FilterModel.reviveFromJson(aData)).filter(v => v)
|
||||
: sieveScriptToFilters(script.body())
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue