@@ -353,39 +353,39 @@ jQuery.extend( {
353
353
resolveContexts = Array ( i ) ,
354
354
resolveValues = slice . call ( arguments ) ,
355
355
356
- // the master Deferred
357
- master = jQuery . Deferred ( ) ,
356
+ // the primary Deferred
357
+ primary = jQuery . Deferred ( ) ,
358
358
359
359
// subordinate callback factory
360
360
updateFunc = function ( i ) {
361
361
return function ( value ) {
362
362
resolveContexts [ i ] = this ;
363
363
resolveValues [ i ] = arguments . length > 1 ? slice . call ( arguments ) : value ;
364
364
if ( ! ( -- remaining ) ) {
365
- master . resolveWith ( resolveContexts , resolveValues ) ;
365
+ primary . resolveWith ( resolveContexts , resolveValues ) ;
366
366
}
367
367
} ;
368
368
} ;
369
369
370
370
// Single- and empty arguments are adopted like Promise.resolve
371
371
if ( remaining <= 1 ) {
372
- adoptValue ( singleValue , master . done ( updateFunc ( i ) ) . resolve , master . reject ,
372
+ adoptValue ( singleValue , primary . done ( updateFunc ( i ) ) . resolve , primary . reject ,
373
373
! remaining ) ;
374
374
375
375
// Use .then() to unwrap secondary thenables (cf. gh-3000)
376
- if ( master . state ( ) === "pending" ||
376
+ if ( primary . state ( ) === "pending" ||
377
377
typeof ( resolveValues [ i ] && resolveValues [ i ] . then ) === "function" ) {
378
378
379
- return master . then ( ) ;
379
+ return primary . then ( ) ;
380
380
}
381
381
}
382
382
383
383
// Multiple arguments are aggregated like Promise.all array elements
384
384
while ( i -- ) {
385
- adoptValue ( resolveValues [ i ] , updateFunc ( i ) , master . reject ) ;
385
+ adoptValue ( resolveValues [ i ] , updateFunc ( i ) , primary . reject ) ;
386
386
}
387
387
388
- return master . promise ( ) ;
388
+ return primary . promise ( ) ;
389
389
}
390
390
} ) ;
391
391
0 commit comments