| 168 | firstParam : |
| 169 | jQuery.Deferred(); |
| 170 | function resolveFunc( i ) { |
| 171 | return function( value ) { |
| 172 | args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; |
| 173 | if ( !( --count ) ) { |
| 174 | // Strange bug in FF4: |
| 175 | // Values changed onto the arguments object sometimes end up as undefined values |
| 176 | // outside the $.when method. Cloning the object into a fresh array solves the issue |
| 177 | deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); |
| 178 | } |
| 179 | }; |
| 180 | } |
| 181 | if ( length > 1 ) { |
| 182 | for( ; i < length; i++ ) { |
| 183 | if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { |