From 3484a68c16f8461fc3493450e916f5b9e8ad5df7 Mon Sep 17 00:00:00 2001 From: terrycojones Date: Fri, 2 Aug 2013 01:04:49 +0100 Subject: [PATCH] Removed an unneeded variable. Closes gh-1321. --- AUTHORS.txt | 1 + src/deferred.js | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 8f63230b8..a714331c7 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -171,3 +171,4 @@ Jason Bedard Kyle Robinson Young Chris Talkington Jason Merino +Terry Jones diff --git a/src/deferred.js b/src/deferred.js index 0efc05dc3..3c0edc038 100644 --- a/src/deferred.js +++ b/src/deferred.js @@ -20,8 +20,7 @@ jQuery.extend({ var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); @@ -31,7 +30,7 @@ jQuery.extend({ .fail( newDefer.reject ) .progress( newDefer.notify ); } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); });