From aabfccf371ac9a16979772dc6411fbe806138fac Mon Sep 17 00:00:00 2001 From: John Resig Date: Fri, 16 Jun 2006 01:51:15 +0000 Subject: [PATCH] Added Klaus' fix for accidental DOM node catches (Ticket #3). --- jquery/jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.js b/jquery/jquery.js index a06e81c2..37c2b3f7 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -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]; }