diff options
author | Winston Howes <winstonhowes@gmail.com> | 2015-03-16 11:20:16 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-03-16 11:21:24 -0400 |
commit | aaeed53e9f1e299975cb6f697c8038ec3a83fa4d (patch) | |
tree | fc93147265f946a87cce485a64758a3717e37788 /src/attributes | |
parent | 332fd941b4ae80e8ca5e5a20aca91806038f4816 (diff) | |
download | jquery-aaeed53e9f1e299975cb6f697c8038ec3a83fa4d.tar.gz jquery-aaeed53e9f1e299975cb6f697c8038ec3a83fa4d.zip |
Attributes: return null when attribute does not exist
Fixes gh-2118
Close gh-2129
Diffstat (limited to 'src/attributes')
-rw-r--r-- | src/attributes/attr.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/attributes/attr.js b/src/attributes/attr.js index caf0bc018..3bb05a5a3 100644 --- a/src/attributes/attr.js +++ b/src/attributes/attr.js @@ -63,12 +63,7 @@ jQuery.extend({ return ret; } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; + return jQuery.find.attr( elem, name ); } }, |