Fix accessing field on oobData which may be undefined

This commit is contained in:
Michael Telatynski 2021-09-17 18:03:31 +01:00
parent b91ece1bcf
commit 1db2a745e8

View file

@ -323,7 +323,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
const messageCase = this.getMessageCase(); const messageCase = this.getMessageCase();
switch (messageCase) { switch (messageCase) {
case MessageCase.Joining: { case MessageCase.Joining: {
title = this.props.oobData.roomType === RoomType.Space ? _t("Joining space …") : _t("Joining room …"); title = this.props.oobData?.roomType === RoomType.Space ? _t("Joining space …") : _t("Joining room …");
showSpinner = true; showSpinner = true;
break; break;
} }