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:
parent
83a044f1b5
commit
abcc1a76ee
2 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue