tsense 0.0.9 → 0.0.10
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 +4 -4
- package/dist/types.d.ts +0 -1
- package/package.json +1 -1
package/dist/tsense.js
CHANGED
|
@@ -403,16 +403,16 @@ 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);
|
|
409
411
|
}
|
|
410
412
|
if (data.length < limit) {
|
|
411
|
-
return { data, nextCursor: null
|
|
413
|
+
return { data, nextCursor: null };
|
|
412
414
|
}
|
|
413
|
-
|
|
414
|
-
const nextCursor = String(lastHit[field]);
|
|
415
|
-
return { data, nextCursor, total: res.found };
|
|
415
|
+
return { data, nextCursor };
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
upsert(docs) {
|
package/dist/types.d.ts
CHANGED