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

Commit

Permalink
fix(cursor): check for sessions independently in core cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jun 20, 2018
1 parent 48c5beb commit cb5df28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/cursor.js
Expand Up @@ -107,13 +107,15 @@ var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) {
transforms: options.transforms
};

if (typeof options.session === 'object') {
this.cursorState.session = options.session;
}

// Add promoteLong to cursor state
if (typeof topologyOptions.promoteLongs === 'boolean') {
this.cursorState.promoteLongs = topologyOptions.promoteLongs;
} else if (typeof options.promoteLongs === 'boolean') {
this.cursorState.promoteLongs = options.promoteLongs;
} else if (typeof options.session === 'object') {
this.cursorState.session = options.session;
}

// Add promoteValues to cursor state
Expand Down

0 comments on commit cb5df28

Please sign in to comment.