mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Ensure _.keysIn skips inheritedconstructor properties.
This commit is contained in:
@@ -8042,7 +8042,7 @@
|
|||||||
// attribute of an existing property and the `constructor` property of a
|
// attribute of an existing property and the `constructor` property of a
|
||||||
// prototype defaults to non-enumerable.
|
// prototype defaults to non-enumerable.
|
||||||
for (var key in object) {
|
for (var key in object) {
|
||||||
if (!(isProto && key == 'constructor') &&
|
if (!(key == 'constructor' && (isProto || (Ctor === proto[key] && !hasOwnProperty.call(object, key)))) &&
|
||||||
!(skipProto && key == 'prototype') &&
|
!(skipProto && key == 'prototype') &&
|
||||||
!(skipErrorProps && (key == 'message' || key == 'name')) &&
|
!(skipErrorProps && (key == 'message' || key == 'name')) &&
|
||||||
!(skipIndexes && (keyIndex = +key, keyIndex > -1 && keyIndex < length && keyIndex % 1 == 0))) {
|
!(skipIndexes && (keyIndex = +key, keyIndex > -1 && keyIndex < length && keyIndex % 1 == 0))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user