From 0c0706db2261dfd0af7f6e085d13c2ff67619eae Mon Sep 17 00:00:00 2001 From: Arne Wilken Date: Fri, 28 Oct 2022 10:51:54 +0200 Subject: [PATCH] Update src/components/structures/MatrixChat.tsx getContent already does the || {} step Co-authored-by: Robin --- src/components/structures/MatrixChat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 847b495f51..ad7c499773 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1136,7 +1136,7 @@ export default class MatrixChat extends React.PureComponent { const client = MatrixClientPeg.get(); const plEvent = roomToLeave.currentState.getStateEvents(EventType.RoomPowerLevels, ''); - const plContent = plEvent ? (plEvent.getContent() || {}) : {}; + const plContent = plEvent ? plEvent.getContent() : {}; const userLevels = plContent.users || {}; const currentUserLevel = userLevels[client.getUserId()]; const userLevelValues = Object.values(userLevels);