diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-03-06 15:11:20 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-03-06 15:11:20 -0500 |
commit | 5c82d36f194a854a19f81bebd3ed1a6e7559c811 (patch) | |
tree | 014d790edef7c2653ea2770126469751141a207e /src | |
parent | 8d1c42296fefc4e79189b6c2d78a8a78fdd9576d (diff) | |
download | jquery-5c82d36f194a854a19f81bebd3ed1a6e7559c811.tar.gz jquery-5c82d36f194a854a19f81bebd3ed1a6e7559c811.zip |
Revert 8d1c42296fefc4e79189b6c2d78a8a78fdd9576d
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core.js b/src/core.js index 39e68c4fc..cae3a90e3 100644 --- a/src/core.js +++ b/src/core.js @@ -422,11 +422,8 @@ jQuery.extend({ }, isPlainObject: function( obj ) { - var key; // Not plain objects: // - Any object or value whose internal [[Class]] property is not "[object Object]" - // ...Unless it was a constructor, whose prototype property was paved over by - // by a plain object at its declaration. #13571 // - DOM nodes // - window if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { @@ -445,11 +442,9 @@ jQuery.extend({ return false; } - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; }, isEmptyObject: function( obj ) { |