-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Hello, currently I'm working with Pipeline
new feature, but this is freeze at try to remove a document
Issue detauls:
- This issue was detected from
16.13.0
version but still occurring with16.19.0
. - I'm working with Windows 11
- My web browser is Microsoft Edge
I share with you, my code to reproduce it.
reminderCollection.addPipeline({
identifier: 'reminder-schedule',
destination: remindersScheduleCollection,
handler: async docs => {
for (let reminder of docs) {
if (reminder.deleted) {
await this.remindersScheduleCollection.findByIds([ reminder.id ]).remove();
// I tried with these other ways but the code still freeze
// await this.remindersScheduleCollection.findOne({ selector: { id: reminder.id } }).remove();
// await this.remindersScheduleCollection.find({ selector: { id: reminder.id } }).remove();
}
}
// Additionally, I tried applying a bulkRemove but the result are same
// await this.remindersScheduleCollection.bulkRemove(docs.map(doc => doc.id))
}
});