From a1e3122706de7c4a71cbeaff83e47c2e24f686d2 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Sat, 28 Apr 2012 23:06:48 +0200 Subject: Gains 1 more byte min/gz and reminds that isResolved and isRejected are deprecated in the comments. --- src/deferred.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/deferred.js') diff --git a/src/deferred.js b/src/deferred.js index a6a3f4219..f509a9aca 100644 --- a/src/deferred.js +++ b/src/deferred.js @@ -66,7 +66,7 @@ jQuery.extend({ promise[ tuple[1] ] = list.add; // Handle state - if ( i < 2 ) { + if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; @@ -74,7 +74,7 @@ jQuery.extend({ // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - // [ isResolved | isRejected ] = [ resolve_list | reject_list ].fired + // [ isResolved | isRejected ] = [ resolve_list | reject_list ].fired promise[ "isR" + stateString.substr( 1 ) ] = list.fired; } -- cgit v1.2.3