Cleanup array.length checks and for() to forEach()

This commit is contained in:
djmaze 2020-07-28 12:35:41 +02:00
parent db5751cd00
commit 82bed1ed80
24 changed files with 135 additions and 169 deletions

2
dev/External/ko.js vendored
View file

@ -951,7 +951,7 @@ ko.extenders.limitedList = (target, limitedList) => {
const currentValue = ko.unwrap(target),
list = ko.unwrap(limitedList);
if (Array.isArray(list) && 0 < list.length) {
if (Array.isArray(list) && list.length) {
if (list.includes(newValue)) {
target(newValue);
} else if (list.includes(currentValue, list)) {