use nesting instead of short-circuited && operator

pull/21833/head
Bruno Windels 2019-02-25 16:21:23 +01:00
parent b8c6bed906
commit a7db42c6cf
1 changed files with 24 additions and 22 deletions

View File

@ -146,7 +146,8 @@ export class RoomPermalinkCreator {
_updateHighestPlUser() { _updateHighestPlUser() {
const plEvent = this._room.currentState.getStateEvents("m.room.power_levels", ""); const plEvent = this._room.currentState.getStateEvents("m.room.power_levels", "");
const content = plEvent && plEvent.getContent(); if (plEvent) {
const content = plEvent.getContent();
if (content) { if (content) {
const users = content.users; const users = content.users;
if (users) { if (users) {
@ -172,6 +173,7 @@ export class RoomPermalinkCreator {
} }
} }
} }
}
this._highestPlUserId = null; this._highestPlUserId = null;
} }