Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Fix to .limit(n): if the next page is not a url (e.g. the link is broken or we reached the last page), the method should return fn(null, pages), and not call fn(null, pages) and continue to the next page.
  • Loading branch information
dfdeagle47 committed Jun 10, 2015
1 parent b8875ab commit 5a8f05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function Xray() {
if (!isUrl(url)) {
debug('%j is not a url, finishing up', url);
stream(obj, true);
fn(null, pages);
return fn(null, pages);
}

stream(obj);
Expand Down

0 comments on commit 5a8f05f

Please sign in to comment.