Simplify isLength check in _.keys.

This commit is contained in:
jdalton
2015-04-01 12:07:12 -07:00
parent 4758a9e66d
commit b28016bfeb

View File

@@ -9584,7 +9584,7 @@
length = object.length;
}
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 isObject(object) ? nativeKeys(object) : [];