Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meteor 1.7 uses v3 of the Mongo driver, which changes the errors thrown by bulk operations. Meteor uses .insert() rather than .insertOne(), so is affected. As a result, with Meteor 1.7, the error's name is BulkWriteError, not MongoError. This commit makes the check compatible with both v2 and v3 of the Mongo driver, by checking just the error code, not the name.
- Loading branch information