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

Commit

Permalink
fix(cursor): do not truncate an existing Long
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Thorsness authored and daprahamian committed Jun 13, 2019
1 parent 8192f8f commit cc26b16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ function initializeCursor(cursor, callback) {

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

Expand Down

0 comments on commit cc26b16

Please sign in to comment.