-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.2.2
-
Component/s: None
-
Empty show more show less
The bulk operation API allows passing a write concern object in two places: when the op is initialized, and when it's executed. If the user passes write concerns at init but not execution, and if the `execute` method is called in the promise form, the write concern object will be overwritten with `undefined`: https://github.com/mongodb/node-mongodb-native/blob/2.2/lib/bulk/unordered.js#L486-L493
Either write concern shouldn't be specified at init time, or a check should be made here to ensure `_writeConcern` isn't undefined.