Skip to content

Commit

Permalink
fix(cursor): do not truncate an existing Long
Browse files Browse the repository at this point in the history
Port of mongodb-js/mongodb-core#441 to native.
  • Loading branch information
daprahamian committed Aug 13, 2019
1 parent 659d2cc commit 317055b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,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 317055b

Please sign in to comment.