-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
Passing an options object to a collection method (i tested with aggregate) extends the original object with additional properties, instead of creating a new one. The problem is with the implementation of the getReadPreference function.
var opts = {};
db.collection('items').aggregate([], opts);
console.log(opts);
The following code prints a big circular object instead of a simple {}.