Skip to content
Permalink
Browse files

Only do the hasAttribute check if the method exists - IE falls back t…

…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 a384d840d609a8ee25b8ca8769a99c33c73b022f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/attributes.js
@@ -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;
}

0 comments on commit a384d84

Please sign in to comment.
You can’t perform that action at this time.