Skip to content

Commit

Permalink
fix(mongo): updated check for nonexistent key
Browse files Browse the repository at this point in the history
Signed-off-by: Jytesh <[email protected]>
  • Loading branch information
Jytesh committed Aug 25, 2021
1 parent ec42add commit 2f9a153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mongo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class KeyvMongo extends EventEmitter {
get (key) {
return this.connect.then(store =>
store.findOne({ key: { $eq: key } }).then(doc => {
if (doc === undefined) {
if (!doc) {
return undefined
}

Expand Down

0 comments on commit 2f9a153

Please sign in to comment.