Skip to content

Commit

Permalink
fix: condition for attempting dynamic import of svg icon in FontAweso…
Browse files Browse the repository at this point in the history
…meIcon component
  • Loading branch information
deodorhunter committed Nov 14, 2023
1 parent 1cb74ca commit 9a14ff6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const FontAwesomeIcon = (props) => {
React.useEffect(() => {
const [prefixFolder, iconName] = getIconInfo(icon, prefix);
if (
iconName !== loadedIcon.iconName ||
prefixFolder !== loadedIcon.family
iconName &&
(iconName !== loadedIcon.iconName || prefixFolder !== loadedIcon.family)
) {
import(
`design-comuni-plone-theme/icons/fontawesome-free-6.4.0-web/svgs/${prefixFolder}/${iconName}.svg`
Expand Down

0 comments on commit 9a14ff6

Please sign in to comment.