mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 20:35:01 -05:00
Attributes: return null when attribute does not exist
Fixes gh-2118 Close gh-2129
This commit is contained in:
committed by
Timmy Willison
parent
332fd941b4
commit
aaeed53e9f
@@ -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 );
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user