diff --git a/web/app/components/workflow/block-icon.tsx b/web/app/components/workflow/block-icon.tsx index 517fbd114b..14dcf3ac81 100644 --- a/web/app/components/workflow/block-icon.tsx +++ b/web/app/components/workflow/block-icon.tsx @@ -97,23 +97,25 @@ const BlockIcon: FC = ({ className, toolIcon, }) => { + const isToolOrDataSource = type === BlockEnum.Tool || type === BlockEnum.DataSource + return (
{ - type !== BlockEnum.Tool && ( + !isToolOrDataSource && ( getIcon(type, size === 'xs' ? 'w-3 h-3' : 'w-3.5 h-3.5') ) } { - (type === BlockEnum.Tool || type === BlockEnum.DataSource) && toolIcon && ( + isToolOrDataSource && toolIcon && ( <> { typeof toolIcon === 'string'