From c2ab59381682dde79e6a6266da7f69ca91d00456 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 19 Nov 2021 10:08:57 +0000 Subject: [PATCH] Prevent custom power levels from breaking roles & permissions tab (#7160) --- .../views/settings/tabs/room/RolesRoomSettingsTab.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index 3e2c68de3a..fc09748870 100644 --- a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx @@ -414,9 +414,9 @@ export default class RolesRoomSettingsTab extends React.Component { } const eventPowerSelectors = Object.keys(eventsLevels).map((eventType, i) => { - if (isSpaceRoom && plEventsToShow[eventType].hideForSpace) { + if (isSpaceRoom && plEventsToShow[eventType]?.hideForSpace) { return null; - } else if (!isSpaceRoom && plEventsToShow[eventType].hideForRoom) { + } else if (!isSpaceRoom && plEventsToShow[eventType]?.hideForRoom) { return null; }