Add isTypedArray check to _.isEmpty.

This commit is contained in:
John-David Dalton
2016-10-04 00:32:15 -07:00
parent 3d7dbd140c
commit d308bce09f

View File

@@ -11403,8 +11403,8 @@
*/
function isEmpty(value) {
if (isArrayLike(value) &&
(isArray(value) || typeof value == 'string' ||
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);