mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +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
3
dev/External/ko.js
vendored
3
dev/External/ko.js
vendored
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue