diff --git a/lib/core/sessions.js b/lib/core/sessions.js index e6c1d75a4b..530b7576df 100644 --- a/lib/core/sessions.js +++ b/lib/core/sessions.js @@ -70,6 +70,8 @@ class ClientSession extends EventEmitter { } options = options || {}; + clientOptions = clientOptions || {}; + this.topology = topology; this.sessionPool = sessionPool; this.hasEnded = false; @@ -81,12 +83,7 @@ class ClientSession extends EventEmitter { typeof options.causalConsistency !== 'undefined' ? options.causalConsistency : true }; - options = options || {}; - if (typeof options.initialClusterTime !== 'undefined') { - this.clusterTime = options.initialClusterTime; - } else { - this.clusterTime = null; - } + this.clusterTime = options.initialClusterTime; this.operationTime = null; this.explicit = !!options.explicit;