Added a fix for $("#noexist").attr("id") breaking.
This commit is contained in:
parent
32f688d303
commit
a87ecc44b6
1 changed files with 1 additions and 1 deletions
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
|
// Look for the case where we're accessing a style value
|
||||||
if ( key.constructor == String )
|
if ( key.constructor == String )
|
||||||
if ( value == undefined )
|
if ( value == undefined )
|
||||||
return jQuery[ type || "attr" ]( this[0], key );
|
return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
|
||||||
else {
|
else {
|
||||||
obj = {};
|
obj = {};
|
||||||
obj[ key ] = value;
|
obj[ key ] = value;
|
||||||
|
|
Loading…
Reference in a new issue