jquery core: Closes #3641. jQuery.merge stopped looping once a 0 was found.
This commit is contained in:
parent
5459180728
commit
4b25b147ab
2 changed files with 17 additions and 2 deletions
|
@ -1149,12 +1149,12 @@ jQuery.extend({
|
|||
// Also, we need to make sure that the correct elements are being returned
|
||||
// (IE returns comment nodes in a '*' query)
|
||||
if ( !jQuery.support.getAll ) {
|
||||
while ( (elem = second[ i++ ]) )
|
||||
while ( (elem = second[ i++ ]) != null )
|
||||
if ( elem.nodeType != 8 )
|
||||
first[ pos++ ] = elem;
|
||||
|
||||
} else
|
||||
while ( (elem = second[ i++ ]) )
|
||||
while ( (elem = second[ i++ ]) != null )
|
||||
first[ pos++ ] = elem;
|
||||
|
||||
return first;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue