File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ export class FindCursor<TSchema = any> extends AbstractCursor<TSchema> {
117
117
}
118
118
}
119
119
120
- const response = await super . getMore ( batchSize , false ) ;
120
+ const response = await super . getMore ( batchSize , this . client . autoEncrypter ? false : true ) ;
121
121
// TODO: wrap this in some logic to prevent it from happening if we don't need this support
122
122
if ( CursorResponse . is ( response ) ) {
123
123
this [ kNumReturned ] = this [ kNumReturned ] + response . batchSize ;
Original file line number Diff line number Diff line change 1
1
import type { Document } from '../bson' ;
2
+ import { CursorResponse } from '../cmap/wire_protocol/responses' ;
2
3
import { MongoInvalidArgumentError } from '../error' ;
3
4
import { ReadConcern } from '../read_concern' ;
4
5
import type { Server } from '../sdam/server' ;
@@ -114,7 +115,7 @@ export class FindOperation extends CommandOperation<Document> {
114
115
documentsReturnedIn : 'firstBatch' ,
115
116
session
116
117
} ,
117
- undefined
118
+ this . explain ? undefined : CursorResponse
118
119
) ;
119
120
}
120
121
}
You can’t perform that action at this time.
0 commit comments