From db27d518b99becfe74f7b968f3e7867550342cc2 Mon Sep 17 00:00:00 2001 From: Vanessa Rodriguez Cristobal Date: Fri, 17 May 2024 10:18:11 +0100 Subject: [PATCH] fix: two more errors on avatar and drodownmenu for defensive code missing --- .../src/components/DropdownMenu/DropdownMenu.tsx | 4 ++-- .../MainMenu/DropdownMenuOverlay/components/UserAvatar.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx index f527e30d3..14f15b549 100644 --- a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx +++ b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx @@ -57,11 +57,11 @@ export const DropdownMenu = ({ isPopup }: DropdownMenuProps): React.ReactElement placement="bottomRight" trigger={['click']} > - {process.env.USE_MULTI_WALLET === 'true' ? ( + {process.env.USE_MULTI_WALLET === 'true' && walletName ? (
) : ( - {walletName[0]?.toUpperCase()} + {walletName && walletName[0]?.toUpperCase()} )}
);