Ensure _.keysIn skips inheritedconstructor properties.

This commit is contained in:
John-David Dalton
2014-10-29 22:41:51 -07:00
parent b768ce4ca4
commit cdf5ac4fc4

View File

@@ -8042,7 +8042,7 @@
// attribute of an existing property and the `constructor` property of a
// prototype defaults to non-enumerable.
for (var key in object) {
if (!(isProto && key == 'constructor') &&
if (!(key == 'constructor' && (isProto || (Ctor === proto[key] && !hasOwnProperty.call(object, key)))) &&
!(skipProto && key == 'prototype') &&
!(skipErrorProps && (key == 'message' || key == 'name')) &&
!(skipIndexes && (keyIndex = +key, keyIndex > -1 && keyIndex < length && keyIndex % 1 == 0))) {