From dade38086cb6904d4e8138914f53e792b740a02d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 20 Oct 2022 00:52:06 -0600 Subject: [PATCH] Fix slightly noisy warning when switching spaces (#9468) Sometimes `spaceName` can be `undefined` because of function timing - use a different method for getting the space's name when this happens. --- src/components/views/rooms/RoomListHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomListHeader.tsx b/src/components/views/rooms/RoomListHeader.tsx index f783e628f3..9c7b5c11aa 100644 --- a/src/components/views/rooms/RoomListHeader.tsx +++ b/src/components/views/rooms/RoomListHeader.tsx @@ -379,7 +379,7 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => { isExpanded={mainMenuDisplayed} className="mx_RoomListHeader_contextMenuButton" title={activeSpace - ? _t("%(spaceName)s menu", { spaceName }) + ? _t("%(spaceName)s menu", { spaceName: spaceName ?? activeSpace.name }) : _t("Home options")} > { title }