Commit 78db847e authored by John Resig's avatar John Resig

The isTimeout fix from #970 was causing unintended status bugs (fixed). This...

The isTimeout fix from #970 was causing unintended status bugs (fixed). This also includes a fix for errors that occurred during an empty eval in IE (but #1410).
parent f267cfae
...@@ -655,8 +655,10 @@ jQuery.extend({ ...@@ -655,8 +655,10 @@ jQuery.extend({
var status; var status;
try { try {
status = isTimeout || (jQuery.httpSuccess( xml ) ? status = isTimeout == "timeout" && "timeout" ||
s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error"); !jQuery.httpSuccess( xml ) && "error" ||
s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
"success";
// Make sure that the request was successful or notmodified // Make sure that the request was successful or notmodified
if ( status != "error" && status != "timeout" ) { if ( status != "error" && status != "timeout" ) {
// Cache Last-Modified header, if ifModified mode. // Cache Last-Modified header, if ifModified mode.
...@@ -826,6 +828,8 @@ jQuery.extend({ ...@@ -826,6 +828,8 @@ jQuery.extend({
// evalulates a script in global context // evalulates a script in global context
// not reliable for safari // not reliable for safari
globalEval: function( data ) { globalEval: function( data ) {
data = jQuery.trim( data );
if ( data ) {
if ( window.execScript ) if ( window.execScript )
window.execScript( data ); window.execScript( data );
else if ( jQuery.browser.safari ) else if ( jQuery.browser.safari )
...@@ -834,5 +838,6 @@ jQuery.extend({ ...@@ -834,5 +838,6 @@ jQuery.extend({
else else
eval.call( window, data ); eval.call( window, data );
} }
}
}); });
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