Fix error if topicEvents is undefined
Signed-off-by: Bastian <matrix@noxware.de>
This commit is contained in:
parent
aa0ae88076
commit
951f0fc816
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ export const CommandMap = {
|
||||||
if (!room) return reject('Bad room ID: ' + roomId);
|
if (!room) return reject('Bad room ID: ' + roomId);
|
||||||
|
|
||||||
const topicEvents = room.currentState.getStateEvents('m.room.topic', '');
|
const topicEvents = room.currentState.getStateEvents('m.room.topic', '');
|
||||||
const topic = topicEvents.getContent().topic;
|
const topic = topicEvents && topicEvents.getContent().topic;
|
||||||
const topicHtml = topic ? linkifyAndSanitizeHtml(topic) : _t('This room has no topic.');
|
const topicHtml = topic ? linkifyAndSanitizeHtml(topic) : _t('This room has no topic.');
|
||||||
|
|
||||||
const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
|
const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue