diff --git a/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx index 3e2c68de3a6..fc09748870f 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; }