Skip to content
Permalink
Browse files

Comment nodes are discarded from a merge, for no apparent reason. Fix…

…es #5438.
  • Loading branch information
jeresig committed Nov 7, 2009
1 parent 6a722e2 commit ef05f44cce870a8b78637b0a88b27087f7f13b37
Showing with 2 additions and 13 deletions.
  1. +2 −13 src/core.js
@@ -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;

0 comments on commit ef05f44

Please sign in to comment.
You can’t perform that action at this time.