]> source.dussan.org Git - jquery.git/commitdiff
Removed an unneeded variable. Closes gh-1321.
authorterrycojones <terry@fluidinfo.com>
Fri, 2 Aug 2013 00:04:49 +0000 (01:04 +0100)
committerOleg <markelog@gmail.com>
Wed, 7 Aug 2013 21:15:16 +0000 (01:15 +0400)
AUTHORS.txt
src/deferred.js

index 8f63230b8caaa66b3d30d5f6270e1cbdb1d37cdc..a714331c796aae50f0f69f0b8b428d359c9c03fd 100644 (file)
@@ -171,3 +171,4 @@ Jason Bedard <jason+jquery@jbedard.ca>
 Kyle Robinson Young <kyle@dontkry.com>
 Chris Talkington <chris@talkingtontech.com>
 Jason Merino <jasonmerino@gmail.com>
+Terry Jones <terry@jon.es>
index 0efc05dc3a00786990e8eb717441a84791785e9f..3c0edc038926c12007d5ea94d7582708c03c361a 100644 (file)
@@ -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 );
                                                                }
                                                        });
                                                });