Make iteration fix in _.keysIn less constructor specific.

This commit is contained in:
John-David Dalton
2014-11-01 01:24:10 -07:00
parent 4fb83fe0a5
commit ab70f306cd
2 changed files with 45 additions and 33 deletions

View File

@@ -8049,7 +8049,7 @@
}
if (support.nonEnumShadows && object !== objectProto) {
var className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object),
nonEnum = nonEnumProps[className] || nonEnumProps[objectClass];
nonEnums = nonEnumProps[className] || nonEnumProps[objectClass];
if (className == objectClass) {
proto = objectProto;
@@ -8057,8 +8057,9 @@
length = shadowedProps.length;
while (length--) {
key = shadowedProps[length];
if (!(isProto && nonEnum[key]) &&
(key == 'constructor' ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {
var nonEnum = nonEnums[key];
if (!(isProto && nonEnum) &&
(nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {
result.push(key);
}
}