Skip to content

Commit

Permalink
Merge pull request #28 from chyipin/fix-getall-loop
Browse files Browse the repository at this point in the history
Prevent getAll looping indefinitely when error occurs
  • Loading branch information
andrewkarell authored Dec 8, 2016
2 parents 2c898fb + acfed2d commit 850dec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pipedrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ THE SOFTWARE.
}
self[resource].getAll(params, function(err, models) {
if (err) {
callback(err);
return callback(err);
} else {
collection = collection.concat(models);
if (models.length < perPage) {
Expand Down

0 comments on commit 850dec7

Please sign in to comment.