Skip to content

Commit

Permalink
Only do the hasAttribute check if the method exists - IE falls back t…
Browse files Browse the repository at this point in the history
…o the === null check below which allows this to still work. Follow-up to cb40495 - thanks to @jitter for the catch.
  • Loading branch information
jeresig committed Sep 27, 2010
1 parent 157a383 commit a384d84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a384d84

Please sign in to comment.