diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx index 804bee0157..fbda9c99ec 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/component.tsx @@ -318,7 +318,9 @@ const ToolBlockComponent: FC = ({ })() const needAuthorization = useMemo(() => { - return !currentProvider?.is_team_authorization + if (!currentProvider) + return false + return !currentProvider.is_team_authorization }, [currentProvider]) const renderIcon = () => { @@ -529,7 +531,7 @@ const ToolBlockComponent: FC = ({ }} > {renderIcon()} - + {displayLabel} {needAuthorization && ( diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx index fa0bf7180d..1f1eb3f2ae 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-group-block-component.tsx @@ -295,7 +295,9 @@ const ToolGroupBlockComponent: FC = ({ }, [currentTool, defaultToolValue, toolConfigFromMetadata]) const needAuthorization = useMemo(() => { - return !currentProvider?.is_team_authorization + if (!currentProvider) + return false + return !currentProvider.is_team_authorization }, [currentProvider]) const readmeEntrance = useMemo(() => { @@ -790,7 +792,7 @@ const ToolGroupBlockComponent: FC = ({ }} > {renderIcon()} - + {providerLabel} {needAuthorization