Skip to content

Commit da5ee34

Browse files
committed
fix: prevent runtime error by using optional chaining for walletInfo.logo
1 parent 6c533cb commit da5ee34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/chain-admin/components/common/Sidebar/SidebarContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const ConnectButton = () => {
6161
const walletLogo =
6262
typeof walletInfo?.logo === 'string'
6363
? walletInfo.logo
64-
: walletInfo.logo.major || walletInfo.logo.minor;
64+
: walletInfo?.logo?.major || walletInfo?.logo?.minor;
6565

6666
return (
6767
<>

0 commit comments

Comments
 (0)