Skip to content

Commit

Permalink
Merge pull request #11 from iamchucky/patch-1
Browse files Browse the repository at this point in the history
Bug fix: forEach to bind this or _self context
  • Loading branch information
James Haley committed May 15, 2015
2 parents 71e47e8 + 95cb2da commit 03e7cb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/batchelor.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Batchelor.prototype.add = function (options) {

// Check if adding multiple requests and loop through array
if (!!Array.isArray(options)) {
options.forEach(_self.add);
options.forEach(_self.add, _self);

return _self;
}
Expand Down Expand Up @@ -280,4 +280,4 @@ Batchelor.prototype.reset = function () {
return this;
};

module.exports = Batchelor;
module.exports = Batchelor;

0 comments on commit 03e7cb3

Please sign in to comment.