Skip to content

Commit ff34eb8

Browse files
committed
feat(NODE-7441): align bufferedCount signature with AbstractCursor
1 parent e2b76fa commit ff34eb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/change_stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,8 @@ export class ChangeStream<
706706
}
707707

708708
/** Returns the currently buffered documents length of the underlying cursor. */
709-
get bufferedCount(): number | undefined {
710-
return this.cursor?.bufferedCount();
709+
bufferedCount(): number {
710+
return this.cursor?.bufferedCount() ?? 0;
711711
}
712712

713713
/** Check if there is any document still available in the Change Stream */

0 commit comments

Comments
 (0)