Ensure shimIsPlainObject returns true for plain objects with a constructor property that has a function value.

This commit is contained in:
John-David Dalton
2014-01-05 13:49:18 -06:00
parent b926ed7b00
commit 16dfdbe314
2 changed files with 15 additions and 10 deletions

View File

@@ -1948,7 +1948,8 @@
// avoid non Object objects, `arguments` objects, and DOM elements
if (!(value && toString.call(value) == objectClass) ||
(ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) ||
(!hasOwnProperty.call(value, 'constructor') &&
(ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor))) ||
(!support.argsClass && isArguments(value)) ||
(!support.nodeClass && isNode(value))) {
return false;