diff options
author | jaubourg <j@ubourg.net> | 2011-02-22 00:44:22 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-02-22 00:44:22 +0100 |
commit | e405419fb796030f7fee2bb8372eca158f85d849 (patch) | |
tree | a8a97a4ecb847fda5a134c7592834a1e314359fd | |
parent | d5f7711ce088975aabaa5c2f64e29cfa0933b848 (diff) | |
download | jquery-e405419fb796030f7fee2bb8372eca158f85d849.tar.gz jquery-e405419fb796030f7fee2bb8372eca158f85d849.zip |
Makes the promise method of Deferreds a bit more readable by not using the variable declared as parameter trick anymore.
-rw-r--r-- | src/core.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js index e7efb6556..31330e8f6 100644 --- a/src/core.js +++ b/src/core.js @@ -890,14 +890,14 @@ jQuery.extend({ isRejected: failDeferred.isResolved, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object - promise: function( obj , i /* internal */ ) { + promise: function( obj ) { if ( obj == null ) { if ( promise ) { return promise; } promise = obj = {}; } - i = promiseMethods.length; + var i = promiseMethods.length; while( i-- ) { obj[ promiseMethods[ i ] ] = deferred[ promiseMethods[ i ] ]; } |