1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Fix for connected sites throwing error if name is null. (#13974)

* Fix for connected sites throwing error if name is null.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Reverted yarn.lock changes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
Olusegun Akintayo 2022-03-16 12:10:07 +04:00 committed by Dan Miller
parent 696f22a5a0
commit 13f385aa30

View File

@ -23,14 +23,14 @@ const IconWithFallback = ({
src={icon}
style={style}
className={className}
alt={name.length ? name : 'icon'}
alt={name || 'icon'}
{...props}
/>
) : (
<span
className={classnames('icon-with-fallback__fallback', fallbackClassName)}
>
{name.length ? name.charAt(0).toUpperCase() : ''}
{name && name.length ? name.charAt(0).toUpperCase() : ''}
</span>
);
};