tsense 0.0.9 → 0.0.11
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/tsense.js +2 -2
- package/package.json +1 -1
package/dist/tsense.js
CHANGED
|
@@ -403,6 +403,8 @@ export class TSense {
|
|
|
403
403
|
});
|
|
404
404
|
const hits = (_d = res.hits) !== null && _d !== void 0 ? _d : [];
|
|
405
405
|
const data = [];
|
|
406
|
+
const lastHit = hits[hits.length - 1].document;
|
|
407
|
+
const nextCursor = String(lastHit[field]);
|
|
406
408
|
for (const hit of hits) {
|
|
407
409
|
const doc = this.deserializeDoc(hit.document);
|
|
408
410
|
data.push(doc);
|
|
@@ -410,8 +412,6 @@ export class TSense {
|
|
|
410
412
|
if (data.length < limit) {
|
|
411
413
|
return { data, nextCursor: null, total: res.found };
|
|
412
414
|
}
|
|
413
|
-
const lastHit = hits[hits.length - 1].document;
|
|
414
|
-
const nextCursor = String(lastHit[field]);
|
|
415
415
|
return { data, nextCursor, total: res.found };
|
|
416
416
|
});
|
|
417
417
|
}
|