From 55006e2b48450ebe81b5a430ed1e5f7333538333 Mon Sep 17 00:00:00 2001 From: arteria32 Date: Mon, 29 Jul 2024 09:01:26 +0300 Subject: [PATCH] fix(Icon): update isComponentSvgData checking for functional component --- src/components/Icon/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Icon/utils.ts b/src/components/Icon/utils.ts index ce14fa4727..9eaeae04c6 100644 --- a/src/components/Icon/utils.ts +++ b/src/components/Icon/utils.ts @@ -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 {