Skip to content

Commit

Permalink
fix(Icon): update isComponentSvgData checking for functional component
Browse files Browse the repository at this point in the history
  • Loading branch information
arteria32 committed Jul 29, 2024
1 parent b82262e commit 55006e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Icon/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function isSvgrData(data: SVGIconData): data is SVGIconSvgrData {
}

export function isComponentSvgData(data: SVGIconData): data is SVGIconComponentData {
return typeof data === 'object' && 'defaultProps' in data;
return (typeof data === 'object' || typeof data === 'function') && 'defaultProps' in data;
}

export function isStringSvgData(data: SVGIconData): data is SVGIconStringData {
Expand Down

0 comments on commit 55006e2

Please sign in to comment.