From 2b551e528be86275bfdedb3509257056947ff042 Mon Sep 17 00:00:00 2001 From: Aaron Meese Date: Fri, 24 Jan 2025 19:23:11 +0000 Subject: [PATCH] fix: cannot read properties of undefined --- lib/connect-loki.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connect-loki.js b/lib/connect-loki.js index 91c6560..737d2d0 100644 --- a/lib/connect-loki.js +++ b/lib/connect-loki.js @@ -141,7 +141,7 @@ module.exports = (session) => { */ LokiStore.prototype.destroy = function (sid, fn) { if (!fn) { fn = _.noop } - this.collection.findAndRemove({ sid }) + if (this.collection) { this.collection.findAndRemove({ sid }) } fn(null) }