Added a fix for $("#noexist").attr("id") breaking.
This commit is contained in:
parent
32f688d303
commit
a87ecc44b6
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue