Cleanup nonEnumProps assignment.

This commit is contained in:
John-David Dalton
2014-06-14 10:19:16 -07:00
parent b195fdbf60
commit 74c08de530

View File

@@ -712,17 +712,14 @@
nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true };
nonEnumProps[objectClass] = { 'constructor': true };
(function() {
var length = shadowedProps.length;
while (length--) {
var key = shadowedProps[length];
for (var className in nonEnumProps) {
if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) {
nonEnumProps[className][key] = false;
}
arrayEach(shadowedProps, function(key) {
for (var className in nonEnumProps) {
if (hasOwnProperty.call(nonEnumProps, className)) {
var props = nonEnumProps[className];
props[key] = hasOwnProperty.call(props, key);
}
}
}());
});
/*--------------------------------------------------------------------------*/