Skip to content

Commit

Permalink
fix: icon component check
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed May 5, 2021
1 parent 2293a4a commit 7b4f784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Props = {

export const Icon: React.FC<Props> = ({ type, className }) => {
const IconComponent = ICONS[type];
return type ? <IconComponent className={className} /> : null;
return IconComponent ? <IconComponent className={className} /> : null;
};

export const IconDirective = toDirective<Props>(
Expand Down

0 comments on commit 7b4f784

Please sign in to comment.