X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=f1de0f8c52d93c31c941794364f991624ee32be8;hb=28ce15979f69903f2fe1187705b190968757ddf7;hp=3ef2d4f1e675405bff17c97623708655710d6365;hpb=23492fdf9fa6f2c3b8ee85d062fed74297f3c438;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 3ef2d4f..f1de0f8 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -530,7 +530,7 @@ jQuery.extend({ handleError: function( s, xhr, status, e ) { // If a local callback was specified, fire it if ( s.error ) { - s.error.call( s.context || window, xhr, status, e ); + s.error.call( s.context || s, xhr, status, e ); } // Fire the global callback @@ -665,7 +665,7 @@ jQuery.extend({ } }); - } else if ( !traditional && typeof obj === "object" ) { + } else if ( !traditional && obj != null && typeof obj === "object" ) { // Serialize object item. jQuery.each( obj, function( k, v ) { buildParams( prefix + "[" + k + "]", v );