Skip to content

Commit

Permalink
fix: FontAwesomeIcon rendering for both array and string formats (#256)
Browse files Browse the repository at this point in the history
* fix: removed condition from FontAwesomeIcon

* chore:  prefixKey = icon[0] re-add

* fix: condition for iconName re-done
  • Loading branch information
Wagner3UB authored Jul 25, 2023
1 parent 5b973c3 commit 06eac0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ const FontAwesomeIcon = (props) => {
};

let prefixKey = prefix;
let iconName = getIconAlias(icon, fontAwesomeAliases);
let iconName = '';

if (Array.isArray(icon)) {
prefixKey = icon[0];
iconName = icon[1];
iconName = getIconAlias(icon[1], fontAwesomeAliases);
} else {
iconName = getIconAlias(icon, fontAwesomeAliases);
}

const prefixFolder =
Expand Down

0 comments on commit 06eac0e

Please sign in to comment.