Ensure the modern build version of _.isPlainObject doesn't error when passed an object created via Object.create. [closes #248]

Former-commit-id: d24641ed2562925fbbd2b64653e8e93ab1aa02bc
This commit is contained in:
John-David Dalton
2013-04-20 19:40:48 -07:00
parent 0b6993bb7c
commit 0562228e9a
4 changed files with 67 additions and 53 deletions

2
dist/lodash.js vendored
View File

@@ -545,7 +545,7 @@
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
var ctor = value.constructor;
if (isFunction(ctor) ? ctor instanceof ctor : (support.nodeClass || !isNode(value))) {
if (isFunction(ctor) ? ctor instanceof ctor : true) {
// In most environments an object's own properties are iterated before
// its inherited properties. If the last iterated property is an object's
// own property then there are no inherited enumerable properties.