diff --git a/src/server/components/UserDatabase.js b/src/server/components/UserDatabase.js index fcaab99..a41840d 100644 --- a/src/server/components/UserDatabase.js +++ b/src/server/components/UserDatabase.js @@ -95,7 +95,7 @@ class UserDatabase extends AbstractUserDatabase { if (!token) throw new Error('Missing token'); - let app = this.cache.find(a => a.token.encrypted === token); + let app = this.cache.find(a => a.token?.encrypted === token); if (app) return Promise.resolve(app); const data = await this.db.findOne(this._appCollection, { 'token.encrypted': token });