optional chaining
This commit is contained in:
parent
89e6ab5984
commit
5fe415dfcf
@ -95,7 +95,7 @@ class UserDatabase extends AbstractUserDatabase {
|
|||||||
|
|
||||||
if (!token) throw new Error('Missing token');
|
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);
|
if (app) return Promise.resolve(app);
|
||||||
|
|
||||||
const data = await this.db.findOne(this._appCollection, { 'token.encrypted': token });
|
const data = await this.db.findOne(this._appCollection, { 'token.encrypted': token });
|
||||||
|
Loading…
Reference in New Issue
Block a user