mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +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
|
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { FilterModel } from 'Model/Filter';
|
||||
import { pString } from 'Common/Utils';
|
||||
import { isNonEmptyArray, 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(
|
||||
Array.isNotEmpty(json.filters)
|
||||
isNonEmptyArray(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