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

This commit is contained in:
Michael Telatynski 2021-11-19 10:08:57 +00:00 committed by GitHub
parent c457da4c6b
commit c2ab593816
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,9 +414,9 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
} }
const eventPowerSelectors = Object.keys(eventsLevels).map((eventType, i) => { const eventPowerSelectors = Object.keys(eventsLevels).map((eventType, i) => {
if (isSpaceRoom && plEventsToShow[eventType].hideForSpace) { if (isSpaceRoom && plEventsToShow[eventType]?.hideForSpace) {
return null; return null;
} else if (!isSpaceRoom && plEventsToShow[eventType].hideForRoom) { } else if (!isSpaceRoom && plEventsToShow[eventType]?.hideForRoom) {
return null; return null;
} }