From e405419fb796030f7fee2bb8372eca158f85d849 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Tue, 22 Feb 2011 00:44:22 +0100 Subject: [PATCH] Makes the promise method of Deferreds a bit more readable by not using the variable declared as parameter trick anymore. --- src/core.js | 4 ++-- 1 file 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 ] ]; } -- 2.39.5