Null guard new function to reduce error spam
This commit is contained in:
parent
275ff6b41e
commit
281e2ab27b
1 changed files with 1 additions and 0 deletions
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue