mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Simplify isLength check in _.keys.
This commit is contained in:
@@ -9584,7 +9584,7 @@
|
|||||||
length = object.length;
|
length = object.length;
|
||||||
}
|
}
|
||||||
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
|
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
|
||||||
(typeof object == 'function' ? lodash.support.enumPrototypes : (length && isLength(length)))) {
|
(typeof object == 'function' ? lodash.support.enumPrototypes : isLength(length))) {
|
||||||
return shimKeys(object);
|
return shimKeys(object);
|
||||||
}
|
}
|
||||||
return isObject(object) ? nativeKeys(object) : [];
|
return isObject(object) ? nativeKeys(object) : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user