Skip to content

Commit

Permalink
Changes corresponding to fix for mongoose #2143
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jul 23, 2014
1 parent 83df2f0 commit 6a9ac4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/promise.js
Expand Up @@ -118,12 +118,11 @@ Promise.prototype.reject = function (reason) {
* @param {Object} [val] value to fulfill the promise with
* @api public
*/
Promise.prototype.resolve = function (err, val) {
Promise.prototype.resolve = function (err) {
if (err) return this.reject(err);
return this.fulfill(val);
return this.fulfill.apply(this, Array.prototype.slice.call(arguments, 1));
};


/**
* Adds a listener to the SUCCESS event.
*
Expand Down

0 comments on commit 6a9ac4a

Please sign in to comment.