diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index cdf1d8e543..64ee94628e 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -452,7 +452,8 @@ export default class UserMenu extends React.Component { public render() { const avatarSize = 32; // should match border-radius of the avatar - const displayName = OwnProfileStore.instance.displayName || MatrixClientPeg.get().getUserId(); + const userId = MatrixClientPeg.get().getUserId(); + const displayName = OwnProfileStore.instance.displayName || userId; const avatarUrl = OwnProfileStore.instance.getHttpAvatarUrl(avatarSize); const prototypeCommunityName = CommunityPrototypeStore.instance.getSelectedCommunityName(); @@ -507,7 +508,7 @@ export default class UserMenu extends React.Component {