Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(cursor): ensure that cursor id defaults to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Feb 12, 2019
1 parent f91304b commit e7e1775
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,8 @@ function initializeCursor(cursor, callback) {
}

// Otherwise fall back to regular find path
cursor.cursorState.cursorId = result.cursorId;
const cursorId = result.cursorId || 0;
cursor.cursorState.cursorId = Long.fromNumber(cursorId);
cursor.cursorState.documents = result.documents;
cursor.cursorState.lastCursorId = result.cursorId;

Expand Down

0 comments on commit e7e1775

Please sign in to comment.