We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfd5385 commit 8d4ba51Copy full SHA for 8d4ba51
src/cursor/abstract_cursor.ts
@@ -412,7 +412,7 @@ export abstract class AbstractCursor<
412
413
/** Get the next available document from the cursor, returns null if no more documents are available. */
414
async next(): Promise<TSchema | null> {
415
- if (this.cursorId === Long.ZERO && (this.documents?.length ?? 0) === 0) {
+ if (this.cursorId === Long.ZERO) {
416
throw new MongoCursorExhaustedError();
417
}
418
0 commit comments