Skip to content

Commit

Permalink
refactor: minor changes to remove mongo deprecation warnings (#7626)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moumouls authored Oct 17, 2021
1 parent 936b5ec commit 68057c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Adapters/Storage/Mongo/MongoStorageAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ export class MongoStorageAdapter implements StorageAdapter {
delete this.connectionPromise;
return;
}
database.on('error', () => {
client.on('error', () => {
delete this.connectionPromise;
});
database.on('close', () => {
client.on('close', () => {
delete this.connectionPromise;
});
this.client = client;
Expand Down Expand Up @@ -555,7 +555,7 @@ export class MongoStorageAdapter implements StorageAdapter {
return this._adaptiveCollection(className)
.then(collection =>
collection._mongoCollection.findOneAndUpdate(mongoWhere, mongoUpdate, {
returnOriginal: false,
returnDocument: 'after',
session: transactionalSession || undefined,
})
)
Expand Down

0 comments on commit 68057c4

Please sign in to comment.