mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 01:55:04 -05:00
If .attr() is run on no elements undefined should be returned (as should be the case when no attribute is found). Fixes #6012.
This commit is contained in:
@@ -799,7 +799,7 @@ function access( elems, key, value, exec, fn, pass ) {
|
||||
}
|
||||
|
||||
// Getting an attribute
|
||||
return length ? fn( elems[0], key ) : null;
|
||||
return length ? fn( elems[0], key ) : undefined;
|
||||
}
|
||||
|
||||
function now() {
|
||||
|
||||
Reference in New Issue
Block a user