use nesting instead of short-circuited && operator
parent
b8c6bed906
commit
a7db42c6cf
|
@ -146,7 +146,8 @@ export class RoomPermalinkCreator {
|
|||
|
||||
_updateHighestPlUser() {
|
||||
const plEvent = this._room.currentState.getStateEvents("m.room.power_levels", "");
|
||||
const content = plEvent && plEvent.getContent();
|
||||
if (plEvent) {
|
||||
const content = plEvent.getContent();
|
||||
if (content) {
|
||||
const users = content.users;
|
||||
if (users) {
|
||||
|
@ -172,6 +173,7 @@ export class RoomPermalinkCreator {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this._highestPlUserId = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue