Array.isArray to isArray

Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
djmaze 2021-03-16 16:49:14 +01:00
parent 986b8f056b
commit 0b64083543
30 changed files with 82 additions and 69 deletions

3
dev/External/ko.js vendored
View file

@ -1,6 +1,7 @@
import { i18n, i18nToNodes, trigger } from 'Common/Translator';
import { doc, createElement } from 'Common/Globals';
import { SaveSettingsStep } from 'Common/Enums';
import { isNonEmptyArray } from 'Common/Utils';
const
isFunction = v => typeof v === 'function',
@ -146,7 +147,7 @@ ko.extenders.limitedList = (target, limitedList) => {
const currentValue = ko.unwrap(target),
list = ko.unwrap(limitedList);
if (Array.isNotEmpty(list)) {
if (isNonEmptyArray(list)) {
if (list.includes(newValue)) {
target(newValue);
} else if (list.includes(currentValue, list)) {