Commit cb40495b authored by John Resig's avatar John Resig

Make sure that missing attributes return undefined in Blackberry 4.7. Fixes #6938.

parent 1bdcffba
......@@ -325,6 +325,12 @@ jQuery.extend({
elem.setAttribute( name, "" + value );
}
// Ensure that missing attributes return undefined
// Blackberry 4.7 returns "" from getAttribute #6938
if ( !elem.attributes[ name ] && !elem.hasAttribute( name ) ) {
return undefined;
}
var attr = !jQuery.support.hrefNormalized && notxml && special ?
// Some attributes require a special call on IE
elem.getAttribute( name, 2 ) :
......
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