Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Prevent custom power levels from breaking roles & permissions tab #7160

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
}

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;
}

Expand Down