Commit a87ecc44 authored by John Resig's avatar John Resig

Added a fix for $("#noexist").attr("id") breaking.

parent 32f688d3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment