aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-02-22 00:44:22 +0100
committerjaubourg <j@ubourg.net>2011-02-22 00:44:22 +0100
commite405419fb796030f7fee2bb8372eca158f85d849 (patch)
treea8a97a4ecb847fda5a134c7592834a1e314359fd
parentd5f7711ce088975aabaa5c2f64e29cfa0933b848 (diff)
downloadjquery-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.js4
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 ] ];
}