1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +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 GitHub
parent c7fabbff87
commit e5869d6fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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>
);
};