Skip to content

Commit

Permalink
Pass canceller into the Deferred constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMotovilov committed Nov 29, 2013
1 parent 9e2cafb commit 3a3f585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Promise.prototype.wait = function(){
Deferred.prototype = Promise.prototype;
// A deferred provides an API for creating and resolving a promise.
exports.Promise = exports.Deferred = exports.defer = defer;
function defer(){
return new Deferred();
function defer( canceller ){
return new Deferred( canceller );
}

var contextHandler = exports.contextHandler = {};
Expand Down

0 comments on commit 3a3f585

Please sign in to comment.