mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
isNonEmptyArray => arrayLength
This commit is contained in:
parent
1e49c1a6ac
commit
5590fd4860
20 changed files with 68 additions and 74 deletions
4
dev/External/ko.js
vendored
4
dev/External/ko.js
vendored
|
|
@ -1,7 +1,7 @@
|
|||
import { i18nToNodes } from 'Common/Translator';
|
||||
import { doc, createElement } from 'Common/Globals';
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { isNonEmptyArray, isFunction } from 'Common/Utils';
|
||||
import { arrayLength, isFunction } from 'Common/Utils';
|
||||
|
||||
const
|
||||
koValue = value => !ko.isObservable(value) && isFunction(value) ? value() : ko.unwrap(value);
|
||||
|
|
@ -136,7 +136,7 @@ ko.extenders.limitedList = (target, limitedList) => {
|
|||
const currentValue = ko.unwrap(target),
|
||||
list = ko.unwrap(limitedList);
|
||||
|
||||
if (isNonEmptyArray(list)) {
|
||||
if (arrayLength(list)) {
|
||||
if (list.includes(newValue)) {
|
||||
target(newValue);
|
||||
} else if (list.includes(currentValue, list)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue