From 29bf601f3495ced43fbb6152bf9306f2618bb955 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 10 Jan 2009 01:07:59 +0000 Subject: Fixed an issue with script nodes being removed incorrectly, fixes #3737. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core.js') diff --git a/src/core.js b/src/core.js index fe5dbc6bf..4047170eb 100644 --- a/src/core.js +++ b/src/core.js @@ -922,7 +922,7 @@ jQuery.extend({ if ( fragment ) { for ( var i = 0; ret[i]; i++ ) { if ( jQuery.nodeName( ret[i], "script" ) ) { - scripts.push( ret[i].parentNode.removeChild( ret[i] ) ); + scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); } else { if ( ret[i].nodeType === 1 ) ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); -- cgit v1.2.3