Skip to content

Commit

Permalink
fix: vars
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Feb 21, 2024
1 parent 2defbeb commit d5a15d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public static async Task<IEnumerable<SynonymHit>> BrowseSynonymsAsync(this Searc
RequestOptions requestOptions = null)
{
const int hitsPerPage = 1000;
var int page = synonymsParams.Page ?? 0;
var page = synonymsParams.Page ?? 0;
synonymsParams.HitsPerPage = hitsPerPage;
var all = await CreateIterable<Tuple<SearchSynonymsResponse, int>>(async (prevResp) =>
{
Expand Down
3 changes: 2 additions & 1 deletion templates/javascript/clients/client/api/helpers.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ browseSynonyms(
};

return createIterablePromise<SearchSynonymsResponse>({
func: (previousResponse) => {
func: (_) => {
const resp = this.searchSynonyms(
{
indexName,
Expand All @@ -226,6 +226,7 @@ browseSynonyms(
requestOptions
);
params.page += 1;
return resp;
},
validate: (response) => response.nbHits < params.hitsPerPage,
...browseSynonymsOptions,
Expand Down

0 comments on commit d5a15d0

Please sign in to comment.