From fd6d34c2de9f31e328f18d78ba24e4bcac9da319 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 28 Jan 2019 13:53:11 -0700 Subject: [PATCH] Default the topic to an empty string otherwise React gets mad --- src/components/views/room_settings/RoomProfileSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/room_settings/RoomProfileSettings.js b/src/components/views/room_settings/RoomProfileSettings.js index 1183b82c96..be3d9c5a37 100644 --- a/src/components/views/room_settings/RoomProfileSettings.js +++ b/src/components/views/room_settings/RoomProfileSettings.js @@ -38,7 +38,7 @@ export default class RoomProfileSettings extends React.Component { let avatarUrl = avatarEvent && avatarEvent.getContent() ? avatarEvent.getContent()["url"] : null; if (avatarUrl) avatarUrl = client.mxcUrlToHttp(avatarUrl, 96, 96, 'crop', false); const topicEvent = room.currentState.getStateEvents("m.room.topic", ""); - const topic = topicEvent && topicEvent.getContent() ? topicEvent.getContent()['topic'] : null; + const topic = topicEvent && topicEvent.getContent() ? topicEvent.getContent()['topic'] : ''; this.state = { originalDisplayName: room.name, displayName: room.name,