-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: legacy-4.0.0, legacy-4.0.1
-
Component/s: None
What problem are you facing?
FindCursor.clone/AggCursor.clone do not return legacy versions so callback style usage after a clone stops working as the instance is a promise only version.
What driver and relevant dependency versions are you using?
mongodb-legacy package
Steps to reproduce?
The second toArray never invokes the callback
const cursor = coll.find({}); this.defer(() => cursor.close()); cursor.toArray((err, docs) => { expect(err).to.not.exist; expect(docs).to.have.length(6); expect(cursor).property('closed').to.be.true; const clonedCursor = cursor.clone(); this.defer(() => clonedCursor.close()); clonedCursor.toArray((err, docs) => { expect(err).to.not.exist; expect(docs).to.have.length(6); expect(clonedCursor).property('closed').to.be.true; done(); }); });
There are no Sub-Tasks for this issue.