diff --git a/lib/core/cursor.js b/lib/core/cursor.js index efeaa7b983..66f6639896 100644 --- a/lib/core/cursor.js +++ b/lib/core/cursor.js @@ -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;