diff --git a/lib/cursor.js b/lib/cursor.js index 1e8822fa4..3b7a97a18 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -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;