diff --git a/src/ajax.js b/src/ajax.js index 9a843022c..adae6aec7 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -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 ); + } } }; }