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

fix(cursor): do not truncate an existing Long #441

Merged
merged 1 commit into from
Jun 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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