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>
feature/default_network_editable
Olusegun Akintayo 3 years ago committed by GitHub
parent c7fabbff87
commit e5869d6fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui/components/ui/icon-with-fallback/icon-with-fallback.component.js

@ -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…
Cancel
Save