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

pull/21833/head
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
1 changed files with 2 additions and 2 deletions

View File

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