mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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
|
// 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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user