Skip to content

Commit 84225c6

Browse files
committed
fix(java): update browse iterator
1 parent f29dfa7 commit 84225c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/java/api_helpers.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public Iterable<Rule> browseRules(String indexName, SearchRulesParams params, Re
389389
return AlgoliaIterableHelper.createIterable(
390390
() -> {
391391
SearchRulesResponse response = this.searchRules(indexName, params.setPage(currentPage.value), requestOptions);
392-
currentPage.value = response.getNbHits() < hitsPerPage ? null : currentPage.value + 1;
392+
currentPage.value = response.getPage() + 1 <= response.getNbPages() ? null : currentPage.value + 1;
393393
return response.getHits().iterator();
394394
},
395395
() -> currentPage.value != null

0 commit comments

Comments
 (0)