]> source.dussan.org Git - jquery.git/commitdiff
jquery core: Fixed a global var leak introduced by me on a recent commit.
authorAriel Flesler <aflesler@gmail.com>
Fri, 26 Dec 2008 15:48:04 +0000 (15:48 +0000)
committerAriel Flesler <aflesler@gmail.com>
Fri, 26 Dec 2008 15:48:04 +0000 (15:48 +0000)
src/core.js

index b8b207b71ed2359d6b94fd656cbb8d26883a4bf6..3900a0a5c629b532c1a91c865a659265318a7c25 100644 (file)
@@ -1016,14 +1016,14 @@ jQuery.extend({
                
                if ( fragment ) {
                        for ( var i = 0; ret[i]; i++ ) {
-                               elem = ret[i];
-                               if ( jQuery.nodeName( elem, "script" ) ) {
-                                       if( elem.parentNode )
-                                               elem.parentNode.removeChild( elem );
+                               var node = ret[i];
+                               if ( jQuery.nodeName( node, "script" ) ) {
+                                       if( node.parentNode )
+                                               node.parentNode.removeChild( node );
                                } else {
-                                       if ( elem.nodeType === 1 )
-                                               ret = jQuery.merge( ret, elem.getElementsByTagName("script"));
-                                       fragment.appendChild( elem );
+                                       if ( node.nodeType === 1 )
+                                               ret = jQuery.merge( ret, node.getElementsByTagName("script"));
+                                       fragment.appendChild( node );
                                }
                        }