Skip to content

Commit

Permalink
Add 'catch' to Promise api
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Jungwirth committed Dec 10, 2015
1 parent b6924bc commit 293eb54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hello.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,9 @@ hello.utils.extend(hello.utils, {
resolver(onRejected, next, "reject" )); /* [Promises/A+ 2.2.3/2.2.6] */
execute(curr);
return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */
},
catch: function(onRejected) {
return this.then(null, onRejected);
}
};

Expand Down

0 comments on commit 293eb54

Please sign in to comment.