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.
t3chguy/dedup-icons-17oct
Travis Ralston 2022-10-20 00:52:06 -06:00 committed by GitHub
parent 17c3fb89c1
commit dade38086c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 }