aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-09-27 09:19:21 -0400
committerjeresig <jeresig@gmail.com>2010-09-27 09:19:21 -0400
commita384d840d609a8ee25b8ca8769a99c33c73b022f (patch)
tree2f51a863c512c0541c993cdffe6c241406ff9803 /src
parent157a383dae5335ef1056d3818d7dd70ac81c25a7 (diff)
downloadjquery-a384d840d609a8ee25b8ca8769a99c33c73b022f.tar.gz
jquery-a384d840d609a8ee25b8ca8769a99c33c73b022f.zip
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 cb40495b21bcb7802f3ab6ae0f837f2bf5b385ed - thanks to @jitter for the catch.
Diffstat (limited to 'src')
-rw-r--r--src/attributes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 608b8e339..1afcf2a8d 100644
--- a/src/attributes.js
+++ b/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;
}