diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index e16296fc1..94a84565f 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -1112,7 +1112,8 @@ while (++index < length) { var value = array[index]; - if (value && typeof value == 'object' && value.length && (isArray(value) || isArguments(value))) { + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { // recursively flatten arrays (susceptible to call stack limits) if (!isShallow) { value = baseFlatten(value, isShallow, isArgArrays); diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 758e8e6c4..0d1c53ab7 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -8,7 +8,7 @@ }function f(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function c(){}function p(n){n.length=0,y.lengthe?0:e);++r=w&&l===n,h=u||g?i():c;if(g){var v=o(h);v?(l=t,h=v):(g=!1,h=u?h:(p(h),c))}for(;++al(h,y))&&((u||g)&&h.push(y),c.push(v))}return g?(p(h.b),s(h)):u&&p(h),c}function ut(n){return function(t,e,r){var u={}; diff --git a/dist/lodash.js b/dist/lodash.js index 6e9e684ce..84d650bbd 100644 --- a/dist/lodash.js +++ b/dist/lodash.js @@ -843,7 +843,8 @@ while (++index < length) { var value = array[index]; - if (value && typeof value == 'object' && value.length && (isArray(value) || isArguments(value))) { + if (value && typeof value == 'object' && typeof value.length == 'number' + && (isArray(value) || isArguments(value))) { // recursively flatten arrays (susceptible to call stack limits) if (!isShallow) { value = baseFlatten(value, isShallow, isArgArrays); diff --git a/dist/lodash.min.js b/dist/lodash.min.js index a53527fb6..315de519d 100644 --- a/dist/lodash.min.js +++ b/dist/lodash.min.js @@ -10,8 +10,8 @@ for(var r=-1,u=M[typeof n]&&qe(n),o=u?u.length:0;++r=_&&f===n,h=u||v?i():s;if(v){var g=o(h);g?(f=t,h=g):(v=!1,h=u?h:(c(h),s))}for(;++af(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(c(h.b),p(h)):u&&c(h),s}function ot(n){return function(t,e,r){var u={};e=X.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++re||typeof t=="undefined")return 1;if(tu(f,l))&&(t&&f.push(l),i.push(a))}return i}function c(n){return function(r,t,e){var u={};t=K(t,e,3),e=-1;var o=r?r.length:0; if(typeof o=="number")for(;++e