Null guard new function to reduce error spam

This commit is contained in:
Travis Ralston 2020-08-28 20:13:26 -06:00
parent 275ff6b41e
commit 281e2ab27b

View file

@ -157,6 +157,7 @@ class FlairStore extends EventEmitter {
* @returns The profile if known, otherwise null. * @returns The profile if known, otherwise null.
*/ */
getGroupProfileCachedFast(matrixClient, groupId) { getGroupProfileCachedFast(matrixClient, groupId) {
if (!matrixClient || !groupId) return null;
if (this._groupProfiles[groupId]) { if (this._groupProfiles[groupId]) {
return this._groupProfiles[groupId]; return this._groupProfiles[groupId];
} }