File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Adapters/Storage/Mongo Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,10 @@ export class MongoStorageAdapter implements StorageAdapter {
180
180
delete this . connectionPromise ;
181
181
return ;
182
182
}
183
- database . on ( 'error' , ( ) => {
183
+ client . on ( 'error' , ( ) => {
184
184
delete this . connectionPromise ;
185
185
} ) ;
186
- database . on ( 'close' , ( ) => {
186
+ client . on ( 'close' , ( ) => {
187
187
delete this . connectionPromise ;
188
188
} ) ;
189
189
this . client = client ;
@@ -555,7 +555,7 @@ export class MongoStorageAdapter implements StorageAdapter {
555
555
return this . _adaptiveCollection ( className )
556
556
. then ( collection =>
557
557
collection . _mongoCollection . findOneAndUpdate ( mongoWhere , mongoUpdate , {
558
- returnOriginal : false ,
558
+ returnDocument : 'after' ,
559
559
session : transactionalSession || undefined ,
560
560
} )
561
561
)
You can’t perform that action at this time.
0 commit comments