Skip to content

Commit ef05f44

Browse files
committed
Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438.
1 parent 6a722e2 commit ef05f44

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/core.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -444,19 +444,8 @@ jQuery.extend({
444444
// expando of getElementsByTagName
445445
var i = 0, elem, pos = first.length;
446446

447-
// Also, we need to make sure that the correct elements are being returned
448-
// (IE returns comment nodes in a '*' query)
449-
if ( !jQuery.support.getAll ) {
450-
while ( (elem = second[ i++ ]) != null ) {
451-
if ( elem.nodeType !== 8 ) {
452-
first[ pos++ ] = elem;
453-
}
454-
}
455-
456-
} else {
457-
while ( (elem = second[ i++ ]) != null ) {
458-
first[ pos++ ] = elem;
459-
}
447+
while ( (elem = second[ i++ ]) != null ) {
448+
first[ pos++ ] = elem;
460449
}
461450

462451
return first;

0 commit comments

Comments
 (0)