diff options
author | John Resig <jeresig@gmail.com> | 2011-05-02 13:25:53 -0400 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2011-05-02 13:25:53 -0400 |
commit | 6c449fd5df3e0ec50e893d055da9aea486e7d71c (patch) | |
tree | 9434297af87668ce6b161df156801092dc17e2bc /src/core.js | |
parent | 86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5 (diff) | |
download | jquery-6c449fd5df3e0ec50e893d055da9aea486e7d71c.tar.gz jquery-6c449fd5df3e0ec50e893d055da9aea486e7d71c.zip |
Make sure that empty nodelists continue to map properly. Fixes #8993.
Diffstat (limited to 'src/core.js')
-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 6ab06e15b..7eb0e0b11 100644 --- a/src/core.js +++ b/src/core.js @@ -720,7 +720,7 @@ jQuery.extend({ i = 0, length = elems.length, // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || jQuery.isArray( elems ) ) ; + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; // Go through the array, translating each of the items to their if ( isArray ) { |