Permalink
Browse files

Minor size reduction by removing a couple unneeded returns

  • Loading branch information...
1 parent 023140e commit 33a36ea3775ef9cdb85c5dbe4200bb29d4e390f5 @briancavalier briancavalier committed Jul 11, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 timeout.js
View
@@ -42,18 +42,18 @@ define(['./when'], function(when) {
}, msec);
function cancelTimeout() {
- clearTimeout(timeout);
- timeout = undef;
+ timeout = clearTimeout(timeout);
}
when(promise,
function(value) {
cancelTimeout();
- return deferred.resolve(value);
+ deferred.resolve(value);
+ return value;
},
function(reason) {
cancelTimeout();
- return deferred.reject(reason);
+ deferred.reject(reason);
}
);

0 comments on commit 33a36ea

Please sign in to comment.