diff --git a/lib/sdam/cursor.js b/lib/sdam/cursor.js index 851603729..f52d7b617 100644 --- a/lib/sdam/cursor.js +++ b/lib/sdam/cursor.js @@ -91,13 +91,15 @@ class Cursor { transforms: options.transforms }; + if (typeof options.session === 'object') { + this.s.session = options.session; + } + // Add promoteLong to cursor state if (typeof topologyOptions.promoteLongs === 'boolean') { this.s.promoteLongs = topologyOptions.promoteLongs; } else if (typeof options.promoteLongs === 'boolean') { this.s.promoteLongs = options.promoteLongs; - } else if (typeof options.session === 'object') { - this.s.session = options.session; } // Add promoteValues to cursor state