mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Add isTypedArray check to _.isEmpty.
This commit is contained in:
@@ -11403,8 +11403,8 @@
|
|||||||
*/
|
*/
|
||||||
function isEmpty(value) {
|
function isEmpty(value) {
|
||||||
if (isArrayLike(value) &&
|
if (isArrayLike(value) &&
|
||||||
(isArray(value) || typeof value == 'string' ||
|
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
||||||
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
|
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
||||||
return !value.length;
|
return !value.length;
|
||||||
}
|
}
|
||||||
var tag = getTag(value);
|
var tag = getTag(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user