From 1db2a745e8b4f46031ab9700fb4226cf2d0e9f1f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 17 Sep 2021 18:03:31 +0100 Subject: [PATCH] Fix accessing field on oobData which may be undefined --- src/components/views/rooms/RoomPreviewBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomPreviewBar.tsx b/src/components/views/rooms/RoomPreviewBar.tsx index 30d634e428f..2acefc93d62 100644 --- a/src/components/views/rooms/RoomPreviewBar.tsx +++ b/src/components/views/rooms/RoomPreviewBar.tsx @@ -323,7 +323,7 @@ export default class RoomPreviewBar extends React.Component { const messageCase = this.getMessageCase(); switch (messageCase) { 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; break; }