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

This commit is contained in:
John Resig 2009-07-22 14:38:21 +00:00
parent 4e8f0c935e
commit fe80b5af45

View File

@ -296,7 +296,9 @@ jQuery.extend({
// Handle memory leak in IE // Handle memory leak in IE
script.onload = script.onreadystatechange = null; script.onload = script.onreadystatechange = null;
head.removeChild( script ); if ( head && script.parentNode ) {
head.removeChild( script );
}
} }
}; };
} }