deferred = {
// then( f1, f2, ...)
- then: function then() {
+ then: function () {
if ( ! cancelled ) {
elem = args[ i ];
type = jQuery.type( elem );
if ( type === "array" ) {
- then.apply( this , elem );
+ deferred.then.apply( deferred , elem );
} else if ( type === "function" ) {
callbacks.push( elem );
}