From cdf5ac4fc43f1cb8b539a34fabd14debd3c3460d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 29 Oct 2014 22:41:51 -0700 Subject: [PATCH] Ensure `_.keysIn` skips inherited`constructor` properties. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 3b3f7d16e..c49bb4ab9 100644 --- a/lodash.js +++ b/lodash.js @@ -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))) {