mirror of
https://github.com/jquery/jquery.git
synced 2026-02-09 11:25:04 -05:00
Make sure that empty nodelists continue to map properly. Fixes #8993.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user