mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed a loop that only worked in webkit.
This commit is contained in:
parent
116c82b027
commit
56628c7adf
14
src/core.js
14
src/core.js
@ -800,12 +800,14 @@ jQuery.extend({
|
|||||||
deferred = {
|
deferred = {
|
||||||
|
|
||||||
// then( f1, f2, ...)
|
// then( f1, f2, ...)
|
||||||
then: function() {
|
then: function then() {
|
||||||
|
|
||||||
if ( ! cancelled ) {
|
if ( ! cancelled ) {
|
||||||
|
|
||||||
var args = arguments,
|
var args = arguments,
|
||||||
i,
|
i,
|
||||||
|
length,
|
||||||
|
elem,
|
||||||
type,
|
type,
|
||||||
_fired;
|
_fired;
|
||||||
|
|
||||||
@ -814,13 +816,13 @@ jQuery.extend({
|
|||||||
fired = 0;
|
fired = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i in args ) {
|
for ( i = 0, length = args.length ; i < length ; i++ ) {
|
||||||
i = args[ i ];
|
elem = args[ i ];
|
||||||
type = jQuery.type( i );
|
type = jQuery.type( elem );
|
||||||
if ( type === "array" ) {
|
if ( type === "array" ) {
|
||||||
this.then.apply( this , i );
|
then.apply( this , elem );
|
||||||
} else if ( type === "function" ) {
|
} else if ( type === "function" ) {
|
||||||
callbacks.push( i );
|
callbacks.push( elem );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user