diff --git a/README.md b/README.md index 2644a31..199a2d6 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ function loop(pageNumber) { }).then(function(recursiveResults) { return [response.body].concat(recursiveResults); }); + } else { + // Done looping + return [response.body]; } }); }