You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
async function performBulkWrite(operations) {
// ...
console.log('before write');
await Model.bulkWrite(operations);
console.log('after write'); // this line never logged if operations.length === 0
// ...
}
This code never reach here console.log('after write'); if operations.length === 0;
Is this the right behaviour?
I have fixed it using if (operations.length === 0) { ... } but I'm still curious.
The text was updated successfully, but these errors were encountered:
vkarpov15
added
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
and removed
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
help wanted
labels
Jul 12, 2023
IslandRhythms
added
can't reproduce
Mongoose devs have been unable to reproduce this issue. Close after 14 days of inactivity.
and removed
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
labels
Jul 14, 2023
Prerequisites
Mongoose version
7.3.0
Node.js version
18.15.0
MongoDB version
6.0.6
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04.2
Issue
Consider this code snippet
This code never reach here
console.log('after write');
if operations.length === 0;Is this the right behaviour?
I have fixed it using
if (operations.length === 0) { ... }
but I'm still curious.The text was updated successfully, but these errors were encountered: