diff --git a/lodash.js b/lodash.js index 8ce21c526..d7e3780ba 100644 --- a/lodash.js +++ b/lodash.js @@ -6954,8 +6954,9 @@ var Ctor = object && object.constructor, length = object ? object.length : 0; - if ((typeof length == 'number' && length > 0) || - (Ctor && object === Ctor.prototype)) { + if ((Ctor && object === Ctor.prototype) || + (typeof length == 'number' && length > 0) || + (support.enumPrototypes && typeof object == 'function')) { return shimKeys(object); } return isObject(object) ? nativeKeys(object) : [];