mm-share-lib 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/lib/search-engine/typesense/service/client.service.js +2 -2
- package/dist/src/lib/search-engine/typesense/service/client.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/lib/search-engine/typesense/service/client.service.ts +2 -2
package/package.json
CHANGED
@@ -106,9 +106,9 @@ export abstract class ClientService<
|
|
106
106
|
searchParameters.per_page = searchParameters.per_page ?? 250;
|
107
107
|
options.cacheSearchResultsForSeconds = 1;
|
108
108
|
const response = await this.searchDocument(searchParameters, options);
|
109
|
-
const { hits = [], found = 0, page = 1 } = response;
|
109
|
+
const { hits = [], found = 0, page = 1 } = { ...response };
|
110
110
|
let documents = hits;
|
111
|
-
const hasNext = hits
|
111
|
+
const hasNext = hits?.length * page < found;
|
112
112
|
if (hasNext) {
|
113
113
|
searchParameters.page = page + 1;
|
114
114
|
documents = await this.getAllRawDocs(searchParameters, options);
|