Navigation Menu

Skip to content

Commit

Permalink
Remove unnecessary function nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
briancavalier committed Nov 20, 2012
1 parent 34753fc commit c9cf458
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions when.js
Expand Up @@ -112,9 +112,7 @@ define(function () {
* @return {Promise} rejected {@link Promise}
*/
function reject(promiseOrValue) {
return when(promiseOrValue, function(value) {
return rejected(value);
});
return when(promiseOrValue, rejected);
}

/**
Expand Down

0 comments on commit c9cf458

Please sign in to comment.