diff --git a/lib/model.js b/lib/model.js index 7536609e4f..76eb66e71b 100644 --- a/lib/model.js +++ b/lib/model.js @@ -3603,7 +3603,7 @@ Model.bulkSave = async function bulkSave(documents, options) { } await Promise.all(successfulDocuments.map(document => handleSuccessfulWrite(document))); - if (bulkWriteError && bulkWriteError.writeErrors && bulkWriteError.writeErrors.length) { + if (bulkWriteError != null) { throw bulkWriteError; }