diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 4d1b2fbb5..53c792100 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -1192,7 +1192,7 @@ const RocketChat = { // get user roles on the server from redux const userRoles = (shareUser?.roles || loginUser?.roles) || []; const mergedRoles = [...new Set([...roomRoles, ...userRoles])]; - return permissions.map(permission => permission.some(r => mergedRoles.includes(r) ?? false)); + return permissions.map(permission => permission?.some(r => mergedRoles.includes(r) ?? false)); } catch (e) { log(e); }