Skip to content

Commit

Permalink
fix: forEach tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Jun 3, 2024
1 parent 48f1fd5 commit 8614df3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cursor/abstract_cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,12 @@ export abstract class AbstractCursor<

try {
const response = await this.getMore(batchSize);
if (response) {
// CursorResponse is disabled in this PR
// however the special `emptyGetMore` can be returned from find cursors
if (CursorResponse.is(response)) {
this[kId] = response.id;
this[kDocuments] = response;
} else if (response?.cursor) {
const cursorId = getCursorId(response);
this[kDocuments].pushMany(response.cursor.nextBatch);
this[kId] = cursorId;
Expand Down

0 comments on commit 8614df3

Please sign in to comment.