Skip to content

Commit

Permalink
Merge pull request #2 from aquiladev/master
Browse files Browse the repository at this point in the history
fix for IE < 9
  • Loading branch information
lvivski committed Jan 14, 2014
2 parents 43f8010 + c51ad9b commit 901f5dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ Promise.prototype.then = function (onFulfill, onReject) {
return promise
}

Promise.prototype.catch = function (onReject) {
Promise.prototype['catch'] = function (onReject) {
return this.then(null, onReject)
}

Promise.prototype.throw = function() {
return this.catch(function (error) {
Promise.prototype['throw'] = function() {
return this['catch'](function (error) {
next(function () {
throw error
})
Expand Down

0 comments on commit 901f5dc

Please sign in to comment.