]> source.dussan.org Git - jquery.git/commitdiff
Added Klaus' fix for accidental DOM node catches (Ticket #3).
authorJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 01:51:15 +0000 (01:51 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 01:51:15 +0000 (01:51 +0000)
jquery/jquery.js

index a06e81c29f169fe6c010575dcff70a28787fe829..37c2b3f73ff03fcc8ea1a1d9f5a14fcc5c40fb38 100644 (file)
@@ -430,7 +430,7 @@ $.clean = function(a) {
                        for ( var j = 0; j < div.childNodes.length; j++ ) {
                                r[r.length] = div.childNodes[j];
                        }
-               } else if ( a[i].length ) {
+               } else if ( a[i].length && !a[i].nodeType ) {
                        for ( var k = 0; k < a[i].length; k++ ) {
                                r[r.length] = a[i][k];
                        }