Commit fe80b5af authored by John Resig's avatar John Resig

Make sure that the script is removed only if it's actually in the page still. Fixes #4934.

parent 4e8f0c93
...@@ -296,8 +296,10 @@ jQuery.extend({ ...@@ -296,8 +296,10 @@ jQuery.extend({
// Handle memory leak in IE // Handle memory leak in IE
script.onload = script.onreadystatechange = null; script.onload = script.onreadystatechange = null;
if ( head && script.parentNode ) {
head.removeChild( script ); head.removeChild( script );
} }
}
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment