diff --git a/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js b/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js index 62c1ba69f..cbf61b599 100644 --- a/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js +++ b/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js @@ -23,14 +23,14 @@ const IconWithFallback = ({ src={icon} style={style} className={className} - alt={name.length ? name : 'icon'} + alt={name || 'icon'} {...props} /> ) : ( - {name.length ? name.charAt(0).toUpperCase() : ''} + {name && name.length ? name.charAt(0).toUpperCase() : ''} ); };