Skip to content

Commit

Permalink
fix(java): update browse iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Oct 31, 2024
1 parent f29dfa7 commit 84225c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/java/api_helpers.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public Iterable<Rule> browseRules(String indexName, SearchRulesParams params, Re
return AlgoliaIterableHelper.createIterable(
() -> {
SearchRulesResponse response = this.searchRules(indexName, params.setPage(currentPage.value), requestOptions);
currentPage.value = response.getNbHits() < hitsPerPage ? null : currentPage.value + 1;
currentPage.value = response.getPage() + 1 <= response.getNbPages() ? null : currentPage.value + 1;
return response.getHits().iterator();
},
() -> currentPage.value != null
Expand Down

0 comments on commit 84225c6

Please sign in to comment.