X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=07d5caf579a09ed42b47171578757834fd3428af;hb=cec68e2b00d86357c18b576cbaed52cc1ea42a74;hp=9e1bfc67fbe0986a4eac88d43e23e81cd9f127f5;hpb=983548f8ebc3fcd1bb4600bc4b740cb8a5d4c48b;p=jquery.git diff --git a/src/core.js b/src/core.js index 9e1bfc6..07d5caf 100644 --- a/src/core.js +++ b/src/core.js @@ -215,7 +215,7 @@ jQuery.fn = jQuery.prototype = { this.toArray() : // Return just the object - ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); + ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack @@ -532,6 +532,12 @@ jQuery.extend({ }, isEmptyObject: function( obj ) { + + // Fixes #7413 Check to see if obj passes isPlainObject + if ( !jQuery.isPlainObject( obj ) ) { + return false; + } + for ( var name in obj ) { return false; }