Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438.

This commit is contained in:
John Resig 2009-11-07 16:15:33 +01:00
parent 6a722e251d
commit ef05f44cce

View file

@ -444,19 +444,8 @@ jQuery.extend({
// expando of getElementsByTagName
var i = 0, elem, pos = first.length;
// 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++ ]) != null ) {
if ( elem.nodeType !== 8 ) {
first[ pos++ ] = elem;
}
}
} else {
while ( (elem = second[ i++ ]) != null ) {
first[ pos++ ] = elem;
}
while ( (elem = second[ i++ ]) != null ) {
first[ pos++ ] = elem;
}
return first;