Skip to content

Commit

Permalink
fix: Fix formated name condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbiscuit committed Aug 28, 2024
1 parent 375a7b7 commit ac83ba9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import '@affinitic/volto-icon-selector-widget/styles/style.less';
const Icon = (props) => {
const { name, size } = props;
const formatedName = name
.split(' ')
.map((separetedName) => `fa-${separetedName}`)
.join(' ');
? name
.split(' ')
.map((separetedName) => `fa-${separetedName}`)
.join(' ')
: '';
return <i className={`af-icon fa-solid ${formatedName} ${size}`}></i>;
};

Expand Down

0 comments on commit ac83ba9

Please sign in to comment.