From 281e2ab27bcf44a230020e14b73e202afd66dd4b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 28 Aug 2020 20:13:26 -0600 Subject: [PATCH] Null guard new function to reduce error spam --- src/stores/FlairStore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stores/FlairStore.js b/src/stores/FlairStore.js index 10a4d96921..67d9616741 100644 --- a/src/stores/FlairStore.js +++ b/src/stores/FlairStore.js @@ -157,6 +157,7 @@ class FlairStore extends EventEmitter { * @returns The profile if known, otherwise null. */ getGroupProfileCachedFast(matrixClient, groupId) { + if (!matrixClient || !groupId) return null; if (this._groupProfiles[groupId]) { return this._groupProfiles[groupId]; }