Commit a384d840 authored by jeresig's avatar jeresig

Only do the hasAttribute check if the method exists - IE falls back to the ===...

Only do the hasAttribute check if the method exists - IE falls back to the === null check below which allows this to still work. Follow-up to cb40495b - thanks to @jitter for the catch.
parent 157a383d
......@@ -332,7 +332,7 @@ jQuery.extend({
// Ensure that missing attributes return undefined
// Blackberry 4.7 returns "" from getAttribute #6938
if ( !elem.attributes[ name ] && !elem.hasAttribute( name ) ) {
if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
return undefined;
}
......
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