X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=4e82608f07fb09cc429c9082be9142a575054770;hb=a87ecc44b6b4374ad2ebe10e033d45daab9e1369;hp=085b576b9e74a1e30804a86e26534ea1a4a33db5;hpb=32f688d303ed3cbb942df421c5bb2ed7a5d5244c;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 085b576..4e82608 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -429,7 +429,7 @@ jQuery.fn = jQuery.prototype = { // Look for the case where we're accessing a style value if ( key.constructor == String ) if ( value == undefined ) - return jQuery[ type || "attr" ]( this[0], key ); + return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined; else { obj = {}; obj[ key ] = value;