summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/utils.jsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index a96c791c7..7f9af571f 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -1203,10 +1203,8 @@ export function canCreateCustomEmoji(user) {
return false;
} else if (window.mm_config.RestrictCustomEmojiCreation === 'admin') {
// check whether the user is an admin on any of their teams
- for (const member of TeamStore.getTeamMembers()) {
- if (isAdmin(member.roles)) {
- return true;
- }
+ if (TeamStore.isTeamAdminForAnyTeam()) {
+ return true;
}
return false;