Skip to content

Commit

Permalink
fix: fix incorrect assertion checking after adding client option
Browse files Browse the repository at this point in the history
  • Loading branch information
mingchuno committed Mar 9, 2021
1 parent aa0bf1f commit a7eb473
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.3.1] - 2021-03-09

### Fixed

- Fix incorrect assertion checking after adding `client` options

## [4.3.0] - 2021-03-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connect-mongo",
"version": "4.3.0",
"version": "4.3.1",
"description": "MongoDB session store for Express and Connect",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/MongoStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ export default class MongoStore extends session.Store {
}
// Check params
assert(
options.mongoUrl || options.clientPromise,
'You must provide either mongoUrl|clientPromise in options'
options.mongoUrl || options.clientPromise || options.client,
'You must provide either mongoUrl|clientPromise|client in options'
)
assert(
options.createAutoRemoveIdx === null ||
Expand Down

0 comments on commit a7eb473

Please sign in to comment.