答案 0 :(得分:-1)
支持库的最新更新中存在一些错误,因此解决方案将库降级,直到问题解决为止,相关性代码应如下所示
var isValid = arrayOfValuesToBeChecked.reduce(function(prev, elem) {
// If elem is not truthy and if it is object, check its length
elem = elem ? typeof(elem) == 'object' ? elem instanceof Array ? elem.length : Object.keys(elem).length : elem : elem;
return prev && elem;
}, true);