diff options
author | jeresig <jeresig@gmail.com> | 2010-02-13 02:23:38 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-02-13 02:23:38 -0500 |
commit | abcc1a76ee2a6733177b2cd104bc32cee5443ec4 (patch) | |
tree | 56f64b98689f8b8aab6934a4807c9b1e9cd8725b /src | |
parent | 83a044f1b5a733dc7ea76dbc9b7dd3a3dc4b7f25 (diff) | |
download | jquery-abcc1a76ee2a6733177b2cd104bc32cee5443ec4.tar.gz jquery-abcc1a76ee2a6733177b2cd104bc32cee5443ec4.zip |
If .attr() is run on no elements undefined should be returned (as should be the case when no attribute is found). Fixes #6012.
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js index 9fa311d50..ba5d7f528 100644 --- a/src/core.js +++ b/src/core.js @@ -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() { |