From aaeed53e9f1e299975cb6f697c8038ec3a83fa4d Mon Sep 17 00:00:00 2001 From: Winston Howes Date: Mon, 16 Mar 2015 11:20:16 -0400 Subject: Attributes: return null when attribute does not exist Fixes gh-2118 Close gh-2129 --- src/attributes/attr.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/attributes') 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 ); } }, -- cgit v1.2.3