Skip to content

Commit

Permalink
Merge pull request #534 from kuhe/pagination-conditions
Browse files Browse the repository at this point in the history
check for pagination stopOnSameToken option
  • Loading branch information
kuhe authored Apr 25, 2022
2 parents 726e52c + b432b27 commit 34dad65
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ private void writePager() {
});

writer.write("yield page;");
writer.write("const prevToken = token;");
writer.write("token = page$L;", destructurePath(outputTokenName));

writer.write("hasNext = !!(token);");
writer.write("hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));");
});

writer.write("// @ts-ignore");
Expand Down

0 comments on commit 34dad65

Please sign in to comment.