Fix memorystore constructor validation

This commit is contained in:
advplyr 2024-08-27 16:53:18 -05:00
parent ec197b2e13
commit 9b35530956

View File

@ -21,7 +21,7 @@ const { Store } = require('express-session')
*/ */
module.exports = class MemoryStore extends Store { module.exports = class MemoryStore extends Store {
constructor(checkPeriod, ttl, max) { constructor(checkPeriod, ttl, max) {
if (typeof checkPeriod !== 'number' || typeof checkPeriod !== 'number' || typeof checkPeriod !== 'number') { if (typeof checkPeriod !== 'number' || typeof ttl !== 'number' || typeof max !== 'number') {
throw Error('All arguments must be provided') throw Error('All arguments must be provided')
} }
super() super()