mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 07:16:36 +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:
parent
696f22a5a0
commit
13f385aa30
@ -23,14 +23,14 @@ const IconWithFallback = ({
|
|||||||
src={icon}
|
src={icon}
|
||||||
style={style}
|
style={style}
|
||||||
className={className}
|
className={className}
|
||||||
alt={name.length ? name : 'icon'}
|
alt={name || 'icon'}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
className={classnames('icon-with-fallback__fallback', fallbackClassName)}
|
className={classnames('icon-with-fallback__fallback', fallbackClassName)}
|
||||||
>
|
>
|
||||||
{name.length ? name.charAt(0).toUpperCase() : ''}
|
{name && name.length ? name.charAt(0).toUpperCase() : ''}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user