| 1104 | firstParam : |
| 1105 | jQuery.Deferred(); |
| 1106 | function resolveFunc( i ) { |
| 1107 | return function( value ) { |
| 1108 | args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; |
| 1109 | if ( !( --count ) ) { |
| 1110 | // Strange bug in FF4: |
| 1111 | // Values changed onto the arguments object sometimes end up as undefined values |
| 1112 | // outside the $.when method. Cloning the object into a fresh array solves the issue |
| 1113 | deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); |
| 1114 | } |
| 1115 | }; |
| 1116 | } |
| 1117 | if ( length > 1 ) { |
| 1118 | for( ; i < length; i++ ) { |
| 1119 | if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { |