Skip to content

Commit

Permalink
Prevent custom power levels from breaking roles & permissions tab (ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored and su-ex committed Dec 3, 2021
1 parent 7519f06 commit 15b9ad8
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 15b9ad8

Please sign in to comment.