aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-01-10 01:07:59 +0000
committerJohn Resig <jeresig@gmail.com>2009-01-10 01:07:59 +0000
commit29bf601f3495ced43fbb6152bf9306f2618bb955 (patch)
tree41b167151eac7543e533c9360c9b04dd7abe5501 /src/core.js
parentafb05081c013bdd38e0dc8ac1c99bbb9f5a00559 (diff)
downloadjquery-29bf601f3495ced43fbb6152bf9306f2618bb955.tar.gz
jquery-29bf601f3495ced43fbb6152bf9306f2618bb955.zip
Fixed an issue with script nodes being removed incorrectly, fixes #3737.
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js2
1 files changed, 1 insertions, 1 deletions
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"))) );