Permalink
Browse files

Makes the promise method of Deferreds a bit more readable by not usin…

…g the variable declared as parameter trick anymore.
  • Loading branch information...
1 parent d5f7711 commit e405419fb796030f7fee2bb8372eca158f85d849 @jaubourg jaubourg committed Feb 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core.js
View
@@ -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 ] ];
}

0 comments on commit e405419

Please sign in to comment.