Null guard new function to reduce error spam

pull/21833/head
Travis Ralston 2020-08-28 20:13:26 -06:00
parent 275ff6b41e
commit 281e2ab27b
1 changed files with 1 additions and 0 deletions

View File

@ -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];
}