File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export class CursorResponse extends MongoDBResponse {
190
190
}
191
191
192
192
public id : Long ;
193
- public ns : MongoDBNamespace ;
193
+ public ns : MongoDBNamespace | null = null ;
194
194
public batchSize = 0 ;
195
195
196
196
private batch : OnDemandDocument ;
@@ -204,8 +204,8 @@ export class CursorResponse extends MongoDBResponse {
204
204
const id = cursor . get ( 'id' , BSONType . long , true ) ;
205
205
this . id = new Long ( Number ( id & 0xffff_ffffn ) , Number ( ( id >> 32n ) & 0xffff_ffffn ) ) ;
206
206
207
- const namespace = cursor . get ( 'ns' , BSONType . string ) ?? '' ;
208
- if ( namespace ) this . ns = ns ( namespace ) ;
207
+ const namespace = cursor . get ( 'ns' , BSONType . string ) ;
208
+ if ( namespace != null ) this . ns = ns ( namespace ) ;
209
209
210
210
if ( cursor . has ( 'firstBatch' ) ) this . batch = cursor . get ( 'firstBatch' , BSONType . array , true ) ;
211
211
else if ( cursor . has ( 'nextBatch' ) ) this . batch = cursor . get ( 'nextBatch' , BSONType . array , true ) ;
You can’t perform that action at this time.
0 commit comments