]> source.dussan.org Git - jquery.git/commitdiff
Only do the hasAttribute check if the method exists - IE falls back to the === null...
authorjeresig <jeresig@gmail.com>
Mon, 27 Sep 2010 13:19:21 +0000 (09:19 -0400)
committerjeresig <jeresig@gmail.com>
Mon, 27 Sep 2010 13:19:21 +0000 (09:19 -0400)
src/attributes.js

index 608b8e339eb6a024f5a86c323c15fe4b45d288fd..1afcf2a8dbbedfc453c9b3bde8b57dcc428a8ffa 100644 (file)
@@ -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;
                        }