Make sure that the script is removed only if it's actually in the page still. Fixes #4934.
This commit is contained in:
parent
4e8f0c935e
commit
fe80b5af45
|
@ -296,7 +296,9 @@ jQuery.extend({
|
|||
|
||||
// Handle memory leak in IE
|
||||
script.onload = script.onreadystatechange = null;
|
||||
head.removeChild( script );
|
||||
if ( head && script.parentNode ) {
|
||||
head.removeChild( script );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue