From f3de384118b03f109b9fe3382e75b6fd1291421c Mon Sep 17 00:00:00 2001 From: Jytesh <44925963+Jytesh@users.noreply.github.com> Date: Thu, 29 Jul 2021 22:37:55 +0530 Subject: [PATCH] build(deps): bump mongo Signed-off-by: Jytesh <44925963+Jytesh@users.noreply.github.com> --- packages/mongo/src/index.js | 5 +++-- packages/mongo/test/index.js | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/mongo/src/index.js b/packages/mongo/src/index.js index 5a1e63b..1d1f5dc 100644 --- a/packages/mongo/src/index.js +++ b/packages/mongo/src/index.js @@ -21,7 +21,8 @@ class KeyvMongo extends EventEmitter { { url: 'mongodb://127.0.0.1:27017', collection: 'keyv', - emitErrors: true + emitErrors: true, + tls: true }, url, options @@ -94,7 +95,7 @@ class KeyvMongo extends EventEmitter { get (key) { return this.connect.then(store => store.findOne({ key: { $eq: key } }).then(doc => { - if (doc === null) { + if (doc === undefined) { return undefined } diff --git a/packages/mongo/test/index.js b/packages/mongo/test/index.js index 6cf247a..ca64c01 100644 --- a/packages/mongo/test/index.js +++ b/packages/mongo/test/index.js @@ -16,7 +16,8 @@ test('Collection option merges into default options', t => { url: 'mongodb://127.0.0.1:27017', mongoOptions: { useNewUrlParser: true, - useUnifiedTopology: true + useUnifiedTopology: true, + tls: true }, collection: 'foo', emitErrors: true @@ -29,7 +30,8 @@ test('Collection option merges into default options if URL is passed', t => { url: mongoURL, mongoOptions: { useNewUrlParser: true, - useUnifiedTopology: true + useUnifiedTopology: true, + tls: true }, collection: 'foo', emitErrors: true