Prevent crash when opening room permission on conduit homeserver (#312)

* Prevent crash when opening room permission on conduit homeserver

* Make fix easier
This commit is contained in:
ginnyTheCat 2022-02-14 16:11:36 +01:00 committed by GitHub
parent 278fd5bd59
commit ff9d509137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,7 +233,7 @@ function RoomPermissions({ roomId }) {
let powerLevel = 0;
let permValue = permInfo.parent
? permissions[permInfo.parent][permKey]
? permissions[permInfo.parent]?.[permKey]
: permissions[permKey];
if (!permValue) permValue = permInfo.default;