git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5bacb53
)
Fixed a loop that only worked in webkit.
author
jaubourg
<aubourg.julian@gmail.com>
Mon, 20 Dec 2010 23:56:00 +0000
(
00:56
+0100)
committer
jaubourg
<j@ubourg.net>
Fri, 31 Dec 2010 02:49:23 +0000
(
03:49
+0100)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
d41b9a9
..
d141c4d
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-800,12
+800,14
@@
jQuery.extend({
deferred = {
// then( f1, f2, ...)
deferred = {
// then( f1, f2, ...)
- then: function() {
+ then: function then() {
if ( ! cancelled ) {
var args = arguments,
i,
if ( ! cancelled ) {
var args = arguments,
i,
+ length,
+ elem,
type,
_fired;
type,
_fired;
@@
-814,13
+816,13
@@
jQuery.extend({
fired = 0;
}
fired = 0;
}
- for ( i in args ) {
- i = args[ i ];
- type = jQuery.type( i );
+ for ( i = 0, length = args.length ; i < length ; i++ ) {
+ elem = args[ 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 );
}
}
}
}