Improvements per @jaubourg

This commit is contained in:
Richard Gibson 2012-12-03 00:49:40 -05:00
parent 5b9bf13439
commit ad690f8151
2 changed files with 4 additions and 2 deletions

View File

@ -194,7 +194,9 @@ function ajaxTest( title, expect, options ) {
options.afterSend( request );
}
return request.then( callIfDefined( "done", "success" ), callIfDefined( "fail", "error" ) );
return request
.done( callIfDefined( "done", "success" ) )
.fail( callIfDefined( "fail", "error" ) );
});
jQuery.when.apply( jQuery, requests ).always( complete, options.teardown, start);

View File

@ -141,7 +141,7 @@ var Globals = (function() {
return {
register: function( name ) {
globals[ name ] = true;
jQuery.globalEval( "var " + name );
jQuery.globalEval( "var " + name + " = undefined;" );
},
cleanup: function() {
var name,